2018-05-23 02:46:44 -07:00
|
|
|
enum Efl.Task_Priority {
|
2019-07-08 07:56:49 -07:00
|
|
|
[[How much processor time will this task get compared to other tasks running on
|
|
|
|
the same processor.
|
2019-03-22 08:25:22 -07:00
|
|
|
@since 1.22
|
|
|
|
]]
|
2019-07-08 07:56:49 -07:00
|
|
|
normal, [[Neither above nor below average priority. This is the default.]]
|
|
|
|
background, [[Far below average priority.]]
|
|
|
|
low, [[Below average priority.]]
|
|
|
|
high, [[Above average priority.]]
|
|
|
|
ultra [[Far above average priority.]]
|
2018-02-20 22:44:11 -08:00
|
|
|
}
|
|
|
|
|
2018-05-23 02:46:44 -07:00
|
|
|
enum Efl.Task_Flags {
|
2019-07-08 07:56:49 -07:00
|
|
|
[[Flags to further customize task's behavior.
|
2019-03-22 08:25:22 -07:00
|
|
|
@since 1.22
|
|
|
|
]]
|
2019-07-08 07:56:49 -07:00
|
|
|
none = 0, [[No special flags.]]
|
|
|
|
use_stdin = 1, [[Task will require console input.]]
|
|
|
|
use_stdout = 2, [[Task will require console output.]]
|
|
|
|
no_exit_code_error = 4, [[Task will not produce an exit code upon termination.]]
|
2018-03-06 01:31:48 -08:00
|
|
|
}
|
|
|
|
|
2019-02-22 05:08:39 -08:00
|
|
|
abstract Efl.Task extends Efl.Loop_Consumer
|
2018-02-20 22:44:11 -08:00
|
|
|
{
|
2019-07-08 07:56:49 -07:00
|
|
|
[[EFL's abstraction for a task (process).
|
2019-03-22 08:25:22 -07:00
|
|
|
@since 1.22
|
2019-07-08 07:56:49 -07:00
|
|
|
]] // TODO: This needs more detail.
|
2018-02-20 22:44:11 -08:00
|
|
|
methods {
|
|
|
|
@property priority {
|
2019-07-08 07:56:49 -07:00
|
|
|
[[The priority of this task.]]
|
2018-02-20 22:44:11 -08:00
|
|
|
get { }
|
|
|
|
set { }
|
|
|
|
values {
|
2019-07-08 07:56:49 -07:00
|
|
|
priority: Efl.Task_Priority; [[Desired priority.]]
|
2018-02-20 22:44:11 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property exit_code {
|
2019-07-08 07:56:49 -07:00
|
|
|
[[The final exit code of this task. This is the code that will be produced upon task completion.]]
|
2018-02-20 22:44:11 -08:00
|
|
|
get { }
|
|
|
|
values {
|
2019-07-08 07:56:49 -07:00
|
|
|
code: int; [[The exit code.]]
|
2018-02-20 22:44:11 -08:00
|
|
|
}
|
|
|
|
}
|
2018-03-06 01:31:48 -08:00
|
|
|
@property flags {
|
2019-07-08 07:56:49 -07:00
|
|
|
[[Flags to further customize task's behavior.]]
|
2018-03-06 01:31:48 -08:00
|
|
|
set { }
|
|
|
|
get { }
|
|
|
|
values {
|
2019-07-08 07:56:49 -07:00
|
|
|
flags: Efl.Task_Flags; [[Desired task flags.]]
|
2018-03-06 01:31:48 -08:00
|
|
|
}
|
|
|
|
}
|
2019-01-10 03:51:18 -08:00
|
|
|
run @pure_virtual {
|
2019-07-08 07:56:49 -07:00
|
|
|
[[Actually run the task.]]
|
|
|
|
return: future<void> @owned; [[A future triggered when task exits and is passed int exit code.]]
|
2018-02-20 22:44:11 -08:00
|
|
|
}
|
2019-01-10 03:51:18 -08:00
|
|
|
end @pure_virtual {
|
2019-07-08 07:56:49 -07:00
|
|
|
[[Request the task end (may send a signal or interrupt
|
|
|
|
signal resulting in a terminate event being tiggered in the
|
|
|
|
target task loop).]]
|
2018-02-20 22:44:11 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
events {
|
|
|
|
}
|
|
|
|
implements {
|
|
|
|
Efl.Object.destructor;
|
|
|
|
Efl.Object.parent { set; }
|
|
|
|
}
|
|
|
|
}
|