pub struct TaskOpts { linked: bool, supervised: bool, watched: bool, indestructible: bool, notify_chan: Option<Chan<TaskResult>>, name: Option<~str>, sched: SchedOpts, stack_size: Option<uint>, }
Task configuration options
linked - Propagate failure bidirectionally between child and parent. True by default. If both this and 'supervised' are false, then either task's failure will not affect the other ("unlinked").
supervised - Propagate failure unidirectionally from parent to child, but not from child to parent. False by default.
watched - Make parent task collect exit status notifications from child before reporting its own exit status. (This delays the parent task's death and cleanup until after all transitively watched children also exit.) True by default.
indestructible - Configures the task to ignore kill signals received from linked failure. This may cause process hangs during failure if not used carefully, but causes task blocking code paths (e.g. port recv() calls) to be faster by 2 atomic operations. False by default.
notify_chan - Enable lifecycle notifications on the given channel
name - A name for the task-to-be, for identification in failure messages.
sched - Specify the configuration of a new scheduler to create the task in
By default, every task is created in the same scheduler as its parent, where it is scheduled cooperatively with all other tasks in that scheduler. Some specialized applications may want more control over their scheduling, in which case they can be spawned into a new scheduler with the specific properties required.
This is of particular importance for libraries which want to call into foreign code that blocks. Without doing so in a different scheduler other tasks will be impeded or even blocked indefinitely.
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).