Loading...
Searching...
No Matches
oscr::drain_request Struct Reference
Inheritance diagram for oscr::drain_request:
oscr::latest_value< T > oscr::message_ring< T, N >

Detailed Description

Whether the reader of a processor to UI channel has a wake-up pending.

The writer calls request() after each write and wakes the reader up (with an execution command) only when it returns true; when the wake-up cannot be sent it calls park(), and what it wrote goes with the next wake-up: the next write's, or the one ui_wakeups::retry() sends on a later tick. The reader calls clear() before it reads, so that a write that it misses wakes it up again.

Public Member Functions

bool request () noexcept
 
void cancel () noexcept
 
void clear () noexcept
 
void park () noexcept
 Writer's thread: the wake-up could not be sent.
 
bool unpark () noexcept
 Writer's thread: whether a wake-up was parked since the last call.
 

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