vibe.d beta banner
get vibe.d

Asynchronous I/O that doesn’t get in your way, written in D

Function EventDriverCore.processEvents

Runs the event loop to process a chunk of events.

abstract ExitReason processEvents (
  core.time.Duration timeout
) nothrow @safe;

This method optionally waits for an event to arrive if none are present in the event queue. The function will return after either the specified timeout has elapsed, or once the event queue has been fully emptied.

On implementations that support it, the function will treat interruptions by POSIX signals as if an event was received and will cause it to return. However, note that it is generally recommended to use EventDriverSignals instead of raw signal handlers in order to avoid their pitfalls as far as possible.


timeout Maximum amount of time to wait for an event. A duration of zero will cause the function to only process pending events. A duration of Duration.max, if necessary, will wait indefinitely until an event arrives.