FiberScheduler.currentTask

size_t currentTask() @property const pure @safe nothrow @nogc

Get the ID of the currently executing task.

Returns

The current task's ID, or 0 if no task is running.