[−][src]Crate rsevents
rsevents
is an implementation of WIN32's auto- and manual-reset events for the rust world.
Events are synchronization primitives (i.e. not implemented atop of mutexes) used to either
create other synchronization primitives with or for implementing signalling between threads.
Events come in two different flavors: AutoResetEvent
and ManualResetEvent
. Internally,
both are implemented with the unsafe [RawEvent
] and use the parking_lot_core
crate to take
care of efficiently suspending (parking) threads while they wait for an event to become
signalled.
An event is a synchronization primitive that is functionally the equivalent of an (optionally gated) waitable boolean that allows for synchronization between threads. Unlike mutexes and condition variables which are most often used to restrict access to a critical section, events are more appropriate for efficiently signalling remote threads or waiting on a remote thread to change state.
Structs
AutoResetEvent | An |
ManualResetEvent | A |
Enums
State | A representation of the state of an event, which can either be |
Traits
Awaitable |