UEFiber

acts like a std.thread.Fiber - adds child Fiber member to enable yield on child fibers (=wait for child fiber to finish)

final
class UEFiber : Fiber {}

Constructors

this
this(T fn)

c'tor

Members

Functions

reset
void reset(T fn)

resets the Fiber to be reused with another method

safeCall
void safeCall()

will call the Fiber in a nothrow way, so it will return any thrown exception inside without automatic rethrow

Examples

t
{
	int i = 0;
	auto fiber = new UEFiber(cast(UEFiberDelegate) { i++; Fiber.yield; i++; });

	fiber.call(); // executes until yield
	assert(i == 1);

	fiber.call(); // finishes
	assert(i == 2

See Also

UEFibers

Meta