vibe.d beta banner
get vibe.d

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

Interface EventDriverEvents

Cross-thread notifications

interface EventDriverEvents ;

"Events" can be used to wake up the event loop of a foreign thread. This is the basis for all kinds of thread synchronization primitives, such as mutexes, condition variables, message queues etc. Such primitives, in case of extended wait periods, should use events rather than traditional means to block, such as busy loops or kernel based wait mechanisms to avoid stalling the event loop.


userData[set] TRetrieves a reference to a user-defined value associated with a descriptor.


addRef Increments the reference count of the given event.
cancelWait Cancels an ongoing wait operation.
create Creates a new cross-thread event.
releaseRef Decrements the reference count of the given event.
trigger Triggers an event owned by the current thread.
trigger Triggers an event possibly owned by a different thread.
wait Waits until an event gets triggered.
rawUserData Low-level user data access. Use userData instead.