FiberScheduler.spawn

TaskHandle spawn(void delegate() fn, string name = null) @trusted

Spawn a new fiber task with the given delegate.

The task is added to the ready queue and will be executed when the scheduler runs.

Parameters

fnThe delegate to execute in the fiber context.
nameOptional name for the task (useful for debugging).

Returns

A TaskHandle that can be used to monitor or cancel the task.
TaskHandle spawn(void function() fn, string name = null) @trusted

ditto