GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
PROCESS_SCHEDULER
+
Point of view
All features
ANY
All features
class PROCESS_SCHEDULER
Summary
top
Direct parents
Inherit list:
PROCESS_RUNNER
Class invariant
top
process_count
.in_range(0,
maximum_process_count
)
Overview
top
Creation features
{
ANY
}
make
Features
{
ANY
}
execute
(program:
STRING
, arguments:
TRAVERSABLE
[
STRING
], keep_environment:
BOOLEAN
)
Execute the given
program
(how the program is discovered is OS-dependent), passing to it the
arguments
.
execute_command_line
(command_line:
STRING
, keep_environment:
BOOLEAN
)
Execute the
command_line
through the operating system's basic shell.
is_ready
:
BOOLEAN
set_parallel_process_count
(parallel_process_count_:
INTEGER_32
)
wait
maximum_process_count
:
INTEGER_32
parallel_process_count
:
INTEGER_32
How many processes can run concurrently in a parallel session.
process_count
:
INTEGER_32
How many processes are currently running.
is_serial
:
BOOLEAN
Are processes currently launched sequentially rather than concurrently.
set_parallel
set_serial
{
ANY
}
register_on_launched
(on_launched_:
PROCEDURE
[
TUPLE 4
[
STRING
,
STRING
,
TRAVERSABLE
[
STRING
],
BOOLEAN
]])
register_on_failed
(on_failed_:
PROCEDURE
[
TUPLE 4
[
STRING
,
STRING
,
TRAVERSABLE
[
STRING
],
BOOLEAN
]])
register_on_finished
(on_finished_:
PROCEDURE
[
TUPLE 5
[
INTEGER_32
,
STRING
,
STRING
,
TRAVERSABLE
[
STRING
],
BOOLEAN
]])
{}
on_launched
:
PROCEDURE
[
TUPLE 4
[
STRING
,
STRING
,
TRAVERSABLE
[
STRING
],
BOOLEAN
]]
on_failed
:
PROCEDURE
[
TUPLE 4
[
STRING
,
STRING
,
TRAVERSABLE
[
STRING
],
BOOLEAN
]]
on_finished
:
PROCEDURE
[
TUPLE 5
[
INTEGER_32
,
STRING
,
STRING
,
TRAVERSABLE
[
STRING
],
BOOLEAN
]]
post_launch
(process:
PROCESS
, launch_info:
PROCESS_LAUNCH_INFO
)
wait_until
(process_count_:
INTEGER_32
)
{}
processes
:
HASHED_DICTIONARY
[
PROCESS_LAUNCH_INFO
,
PROCESS
]
factory
:
PROCESS_FACTORY
group
:
PROCESS_GROUP
new_process
:
PROCESS
wait_process
:
PROCESS
make
execute
(program:
STRING
, arguments:
TRAVERSABLE
[
STRING
], keep_environment:
BOOLEAN
)
effective procedure
{
ANY
}
top
Execute the given
program
(how the program is discovered is OS-dependent), passing to it the
arguments
.
The environment is cleared if
keep_environment
is False.
require
program /= Void
is_ready
execute_command_line
(command_line:
STRING
, keep_environment:
BOOLEAN
)
effective procedure
{
ANY
}
top
Execute the
command_line
through the operating system's basic shell.
The environment is cleared if
keep_environment
is False.
See also:
SYSTEM
.execute_command
require
command_line /= Void
not command_line.is_empty
is_ready
is_ready
:
BOOLEAN
effective function
{
ANY
}
top
ensure
Result =
maximum_process_count
>= 1
set_parallel_process_count
(parallel_process_count_:
INTEGER_32
)
effective procedure
{
ANY
}
top
require
parallel_process_count_ >= 1
ensure
parallel_process_count
.in_range(0, parallel_process_count_)
wait
effective procedure
{
ANY
}
top
ensure
process_count
= 0
maximum_process_count
:
INTEGER_32
effective function
{
ANY
}
top
ensure
is_serial
implies Result =
parallel_process_count
.min(1)
not
is_serial
implies Result =
parallel_process_count
parallel_process_count
:
INTEGER_32
writable attribute
{
ANY
}
top
How many processes can run concurrently in a parallel session.
process_count
:
INTEGER_32
writable attribute
{
ANY
}
top
How many processes are currently running.
is_serial
:
BOOLEAN
writable attribute
{
ANY
}
top
Are processes currently launched sequentially rather than concurrently.
set_parallel
effective procedure
{
ANY
}
top
set_serial
effective procedure
{
ANY
}
top
register_on_launched
(on_launched_:
PROCEDURE
[
TUPLE 4
[
STRING
,
STRING
,
TRAVERSABLE
[
STRING
],
BOOLEAN
]])
effective procedure
{
ANY
}
top
ensure
on_launched
= on_launched_
register_on_failed
(on_failed_:
PROCEDURE
[
TUPLE 4
[
STRING
,
STRING
,
TRAVERSABLE
[
STRING
],
BOOLEAN
]])
effective procedure
{
ANY
}
top
ensure
on_failed
= on_failed_
register_on_finished
(on_finished_:
PROCEDURE
[
TUPLE 5
[
INTEGER_32
,
STRING
,
STRING
,
TRAVERSABLE
[
STRING
],
BOOLEAN
]])
effective procedure
{
ANY
}
top
ensure
on_finished
= on_finished_
on_launched
:
PROCEDURE
[
TUPLE 4
[
STRING
,
STRING
,
TRAVERSABLE
[
STRING
],
BOOLEAN
]]
writable attribute
{}
top
on_failed
:
PROCEDURE
[
TUPLE 4
[
STRING
,
STRING
,
TRAVERSABLE
[
STRING
],
BOOLEAN
]]
writable attribute
{}
top
on_finished
:
PROCEDURE
[
TUPLE 5
[
INTEGER_32
,
STRING
,
STRING
,
TRAVERSABLE
[
STRING
],
BOOLEAN
]]
writable attribute
{}
top
post_launch
(process:
PROCESS
, launch_info:
PROCESS_LAUNCH_INFO
)
effective procedure
{}
top
wait_until
(process_count_:
INTEGER_32
)
effective procedure
{}
top
require
process_count_ >= 0
ensure
process_count
<= process_count_
processes
:
HASHED_DICTIONARY
[
PROCESS_LAUNCH_INFO
,
PROCESS
]
writable attribute
{}
top
factory
:
PROCESS_FACTORY
writable attribute
{}
top
group
:
PROCESS_GROUP
effective function
{}
top
new_process
:
PROCESS
effective function
{}
top
wait_process
:
PROCESS
effective function
{}
top
ensure
Result /= Void
make
effective procedure
{}
top