TaskHandle that can be used to monitor or cancel the task.FiberScheduler.spawnWithToken
TaskHandle spawnWithToken(void delegate() fn, CancelToken token, string name = null) @trustedSpawn a new fiber task with a cancellation token.
If the token is already cancelled at spawn time, the task is immediately marked CANCELLED and never runs. Otherwise, the scheduler checks the token before each resume in tick().
Parameters
fn | The delegate to execute in the fiber context. |
token | Cancellation token to observe. |
name | Optional name for the task. |
Returns
A