OnDemandWorkerFunc.cancel

Cancel currently running tasks.

struct OnDemandWorkerFunc(alias F)
nothrow @safe @nogc
void
cancel
(
bool currentOnly = false
)

Parameters

currentOnly bool

Cancel only the currently running task. False (default) means to cancel the current task and also all currently scheduled tasks. Setting to true means cancel only the currently running task. If another one is scheduled, it will get carried out.

Meta