Crystal::EventLoop::Polling::Waiters
A FIFO queue of Event waiting on the same operation (either read or write)
for a fd. See PollDescriptor.
Race conditions on the state of the waiting list are handled through the ready always ready variables.
Thread unsafe: parallel mutations must be protected with a lock.
Constructors
new
SourceInstance methods
Adds an event to the waiting list. May return false immediately if another thread marked the list as ready in parallel, returns true otherwise.
initialize
Sourceready_all
Dequeues all pending events and marks the list as always ready. This must be called when a fd is closed or an error or hup event occurred.
ready_one
Removes one pending event or marks the list as ready when there are no pending events (we got notified of readiness before a thread enqueued).