ark::core::PollSet
Defined in header “ark/core/poll_set.hh”.
A pollable set represents a set of pollables that can be grouped together and polled to determine if they are ready for reading or writing.
Methods
-
void add(const core::PollablePtr & pollable, PollEventFlags flags)
Adds a new pollable to the pollable set. This pollable will be polled when you call poll(). -
void remove(const core::PollablePtr & pollable)
Removes the given pollable from this pollable set. This removes every pollable from the set, no matter which flags are present. -
void remove(const core::PollablePtr & pollable, PollEventFlags flags)
Removes the given pollable from this pollable set. This removes only pollables with these specific flags. -
size_t size()
Returns the number of pollables contained within this set. -
std::vector< PollDescriptor > poll_for(std::chrono::nanoseconds duration)
Returns an array of pollable poll descriptors back. The flags indicates what bit is set (if any) if the pollable is available for reading or writing.