Pigweed
C/C++ API Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
Public Member Functions | List of all members
pw::async2::internal::WakerQueueBase Class Reference
Inheritance diagram for pw::async2::internal::WakerQueueBase:
pw::async2::WakerQueue< kCapacity >

Public Member Functions

constexpr WakerQueueBase (InlineQueue< Waker > &queue)
 
size_t size () const
 Returns the number of wakers in the queue.
 
bool empty () const
 Returns true if there are no wakers in the queue.
 
bool full () const
 Returns true if the queue has no remaining space.
 
void WakeOne ()
 Wakes the first Waker in the queue.
 
void WakeMany (size_t count)
 Wakes count Wakers from the front of the queue.
 
void WakeAll ()
 Wakes every Waker in the queue.
 
bool Add (Waker &&waker)
 

Member Function Documentation

◆ Add()

bool pw::async2::internal::WakerQueueBase::Add ( Waker &&  waker)

Adds a waker to the end of the queue if there is space. Returns true if the waker was added, or false if the queue is full.

NOTE: Prefer using PW_ASYNC_STORE_WAKER instead of this API directly as it supports specifying a wait reason.


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