forked from enlightenment/efl
72 lines
2.2 KiB
Plaintext
72 lines
2.2 KiB
Plaintext
enum Efl.Task_Priority {
|
|
[[How much processor time will this task get compared to other tasks running on
|
|
the same processor.
|
|
@since 1.22
|
|
]]
|
|
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.]]
|
|
}
|
|
|
|
enum Efl.Task_Flags {
|
|
[[Flags to further customize task's behavior.
|
|
@since 1.22
|
|
]]
|
|
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.]]
|
|
exit_with_parent = 8, [[Exit when parent exits.]]
|
|
}
|
|
|
|
abstract Efl.Task extends Efl.Loop_Consumer
|
|
{
|
|
[[EFL's abstraction for a task (process).
|
|
@since 1.22
|
|
]] // TODO: This needs more detail.
|
|
methods {
|
|
@property priority {
|
|
[[The priority of this task.]]
|
|
get { }
|
|
set { }
|
|
values {
|
|
priority: Efl.Task_Priority; [[Desired priority.]]
|
|
}
|
|
}
|
|
@property exit_code {
|
|
[[The final exit code of this task. This is the code that will be produced upon task completion.]]
|
|
get { }
|
|
values {
|
|
code: int; [[The exit code.]]
|
|
}
|
|
}
|
|
@property flags {
|
|
[[Flags to further customize task's behavior.]]
|
|
set { }
|
|
get { }
|
|
values {
|
|
flags: Efl.Task_Flags(Efl.Task_Flags.exit_with_parent); [[Desired task flags.]]
|
|
}
|
|
}
|
|
run @pure_virtual {
|
|
[[Actually run the task.]]
|
|
return: bool; [[On success in starting the task, return true, otherwise false]]
|
|
}
|
|
end @pure_virtual {
|
|
[[Request the task end (may send a signal or interrupt
|
|
signal resulting in a terminate event being triggered in the
|
|
target task loop).]]
|
|
}
|
|
}
|
|
events {
|
|
exit: void; [[Called when the task exits. You can pick up any information you need at this point such as exit_code etc.]]
|
|
}
|
|
implements {
|
|
Efl.Object.constructor;
|
|
Efl.Object.destructor;
|
|
Efl.Object.parent { set; }
|
|
}
|
|
}
|