switchToTask

Switches execution to the given task.

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.prioritized or TaskSwitchPriority.immediate will be used, depending on whether a yield lock is currently active.

Note that it is illegal to use TaskSwitchPriority.immediate 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!

  1. void switchToTask(Task t)
    @safe nothrow
    void
    switchToTask
    (
    Task t
    )
  2. void switchToTask(Task t, TaskSwitchPriority priority)

See Also

hibernate, yieldLock

Meta