TestFiber

Undocumented in source.
version(CoreUnittest)
class TestFiber : Fiber {}

Constructors

this
this()
Undocumented in source.

Members

Functions

run
void run()
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

expSum
enum expSum;
Undocumented in source.

Variables

sum
size_t sum;
Undocumented in source.

Inherited Members

From Fiber

defaultStackPages
enum defaultStackPages;
Undocumented in source.
defaultStackPages
enum defaultStackPages;
Undocumented in source.
defaultStackPages
enum defaultStackPages;
Undocumented in source.
defaultStackPages
enum defaultStackPages;
Undocumented in source.
~this
~this()

Cleans up any remaining resources used by this object.

call
Throwable call(Rethrow rethrow)
Throwable call()

Transfers execution to this fiber object. The calling context will be suspended until the fiber calls Fiber.yield() or until it terminates via an unhandled exception.

Rethrow
enum Rethrow

Flag to control rethrow behavior of $(LREF call)

reset
void reset()
void reset(void function() fn)
void reset(void delegate() dg)

Resets this fiber so that it may be re-used, optionally with a new function/delegate. This routine should only be called for fibers that have terminated, as doing otherwise could result in scope-dependent functionality that is not executed. Stack-based classes, for example, may not be cleaned up properly if a fiber is reset before it has terminated.

State
enum State

//////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// A fiber may occupy one of three states: HOLD, EXEC, and TERM.

state
State state [@property getter]

Gets the current state of this fiber.

yield
void yield()

Forces a context switch to occur away from the calling fiber.

yieldAndThrow
void yieldAndThrow(Throwable t)

Forces a context switch to occur away from the calling fiber and then throws obj in the calling fiber.

getThis
Fiber getThis()

Provides a reference to the calling fiber or null if no fiber is currently active.

Meta