Initializes a generator object which is associated with a static D function. The function will be called once to prepare the range for iteration.
Initializes a generator object which is associated with a static D function. The function will be called once to prepare the range for iteration.
Initializes a generator object which is associated with a static D function. The function will be called once to prepare the range for iteration.
Initializes a generator object which is associated with a dynamic D function. The function will be called once to prepare the range for iteration.
Initializes a generator object which is associated with a dynamic D function. The function will be called once to prepare the range for iteration.
Initializes a generator object which is associated with a dynamic D function. The function will be called once to prepare the range for iteration.
Returns true if the generator is empty.
Returns the most recently generated value by shallow copy.
Returns the most recently generated value without executing a copy contructor. Will not compile for element types defining a postblit, because Generator does not return by reference.
Obtains the next value from the underlying function.
Cleans up any remaining resources used by this object.
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.
Flag to control rethrow behavior of $(LREF call)
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.
//////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// A fiber may occupy one of three states: HOLD, EXEC, and TERM.
Gets the current state of this fiber.
Forces a context switch to occur away from the calling fiber.
Forces a context switch to occur away from the calling fiber and then throws obj in the calling fiber.
Provides a reference to the calling fiber or null if no fiber is currently active.
A Generator is a Fiber that periodically returns values of type T to the caller via yield. This is represented as an InputRange.