template <typename T>
class AsyncReceiver
Defined at line 99 of file ../../src/sys/fuzzing/common/async-deque.h
Receiving half of an async deque.
This class is thread-safe.
Public Methods
void AsyncReceiver<T> (AsyncSender<T> * out)
Creates a receiver and returns its associated sender via `out`.
Defined at line 102 of file ../../src/sys/fuzzing/common/async-deque.h
AsyncReceiverPtr<T> MakePtr (AsyncSender<T> * out)
Defined at line 106 of file ../../src/sys/fuzzing/common/async-deque.h
void ~AsyncReceiver<T> ()
Defined at line 110 of file ../../src/sys/fuzzing/common/async-deque.h
Result<T> TryReceive ()
Attempts to get an item immediately. If no item is available at the time of the call, it
returns an error.
Defined at line 114 of file ../../src/sys/fuzzing/common/async-deque.h
Promise<T> Receive ()
Returns a promise to get an item once it has been sent. If this underlying object is closed, it
can still return data that was "in-flight", i.e. sent but not yet `Receive`d. If the object is
closed and no more data remains, all outstanding promises returned by `Receive`s will return an
error.
Defined at line 120 of file ../../src/sys/fuzzing/common/async-deque.h
void Close ()
Closes the underlying object, preventing any further items from being sent. To use a theme-park
analogy, this is the "rope at the end of the line": no more items can join the queue, but those
already in the queue will still be processed.
Defined at line 125 of file ../../src/sys/fuzzing/common/async-deque.h
void Clear ()
Close this object and drops all queued items and pending calls to `Receive`.
Defined at line 128 of file ../../src/sys/fuzzing/common/async-deque.h
void Reset ()
Clears this object and resets it to a default, open state.
Defined at line 131 of file ../../src/sys/fuzzing/common/async-deque.h