FiberGroup.spawnFiberIfOpen

Conditionally spawn a new fiber, only if the fiber group is currently open.

This function is useful in certain racy cases, where the fiber group has been closed, but has not yet finished closing.

struct FiberGroup
nothrow @safe @nogc
spawnFiberIfOpen
(
void delegate
()
dg
)

Parameters

dg void delegate
()

the delegate to run inside the fiber

Return Value

The FiberHandle of the new fiber if successful, the invalid FiberHandle if the fiber group is closed or closing.

Meta