Function switchToTask
Switches execution to the given task.
void switchToTask
(
Task t
) nothrow @safe;
void switchToTask
(
Task t,
TaskSwitchPriority priority
) nothrow @safe;
This function can be used in conjunction with hibernate
to wake up a
task. The task must live in the same thread as the caller.
If no priority is specified, TaskSwitchPriority
or
TaskSwitchPriority
will be used, depending on whether a
yield lock is currently active.
Note that it is illegal to use TaskSwitchPriority
if a yield
lock is active.
This function must only be called on tasks that belong to the calling thread and have previously been hibernated!