Iros
 
Loading...
Searching...
No Matches
iris::WaitQueue Class Reference

#include <iris/core/wait_queue.h>

Public Member Functions

void notify_one (di::FunctionRef< void()> action)
 Notify exactly one waiter that an event occurred.
 
void notify_all (di::FunctionRef< void()> action)
 Notify all waiters that an event occurred.
 
auto wait (di::FunctionRef< bool()> predicate) -> Expected< void >
 Wait for an event to occur.
 

Member Function Documentation

◆ notify_all()

void iris::WaitQueue::notify_all ( di::FunctionRef< void()> action)

Notify all waiters that an event occurred.

Parameters
actionCallback which is executed with the WaitQueue's lock held.

◆ notify_one()

void iris::WaitQueue::notify_one ( di::FunctionRef< void()> action)

Notify exactly one waiter that an event occurred.

Parameters
actionCallback which is executed with the WaitQueue's lock held.

◆ wait()

auto iris::WaitQueue::wait ( di::FunctionRef< bool()> predicate) -> Expected<void>

Wait for an event to occur.

This will block the currently executing task until predicate is satisfied.

Parameters
predicatePredicate which will met if this function returns successfully.
Returns
Returns an error if the current task was interrupted by userspace, and otherwise returns success once an event has occurred.

The documentation for this class was generated from the following files: