FiberTimerEvent

Fiber-suspending timer event. Allows a fiber to be suspended for a fixed time period.

Constructors

this
this(SelectFiber fiber, bool realtime)

Constructor. Initialises (but does not register) the timer fd.

Members

Functions

events
Event events()

Returs: the epoll events to register for.

fileHandle
Handle fileHandle()

Required by ISelectable interface.

handle
bool handle(Event events)

Handles events which occurred for the timer event fd. Resumes the fiber.

id
cstring id()
wait
void wait(double s)

Sets the timer to a number of seconds and milliseconds approximating the floating point value specified, registers it, and suspends the fiber until it fires.

wait
void wait(uint s, uint ms)

Sets the timer to the specified number of seconds and milliseconds, registers it, and suspends the fiber until it fires. If both seconds and milliseconds are 0, the fiber is not suspended and the event is not registered with epoll -- no pause occurs.

Inherited Members

From IFiberSelectClient

SelectFiber
alias SelectFiber = .SelectFiber

Type alias for subclass constructors

fiber
SelectFiber fiber;

Fiber instance

io_error
bool io_error;

Flag set to true when the error_() method is called due to an I/O error event. The flag is always reset in the finalize() method.

finalize
void finalize(FinalizeStatus status)

Finalize method, called after this instance has been unregistered from the Dispatcher; kills the fiber and calls the super-class' finalize() method (which calls a finalizer delegate, if one has been set).

error_
void error_(Exception e, Event event)

Error reporting method, called when either an Exception is caught from handle() or an error event is reported; kills the fiber.

timeout
void timeout()

Timeout method, called after this a timeout has occurred in the SelectDispatcher; kills the fiber.

Meta