C/C++ API Reference
Loading...
Searching...
No Matches
pw::async2::Receiver< T > Class Template Reference

Overview

template<typename T>
class pw::async2::Receiver< T >

A receiver which reads values from an asynchronous channel.

Public Member Functions

 Receiver (const Receiver &other)=delete
 
Receiveroperator= (const Receiver &other)=delete
 
 Receiver (Receiver &&other) noexcept
 
Receiveroperator= (Receiver &&other) noexcept
 
Result< T > BlockingReceive (Dispatcher &dispatcher, chrono::SystemClock::duration timeout=internal::Channel< T >::kWaitForever)
 
ReceiveFuture< T > Receive ()
 
Result< T > TryReceive ()
 
void Disconnect ()
 
bool is_open () const
 Returns true if the channel is open.
 

Friends

template<typename U >
class internal::Channel
 
template<typename U >
std::optional< std::tuple< MpscChannelHandle< U >, Receiver< U > > > CreateMpscChannel (Allocator &, uint16_t)
 
template<typename U , uint16_t kCapacity>
std::tuple< MpscChannelHandle< U >, Receiver< U > > CreateMpscChannel (ChannelStorage< U, kCapacity > &storage)
 
template<typename U >
std::optional< std::tuple< SpscChannelHandle< U >, Sender< U >, Receiver< U > > > CreateSpscChannel (Allocator &, uint16_t)
 
template<typename U , uint16_t kCapacity>
std::tuple< SpscChannelHandle< U >, Sender< U >, Receiver< U > > CreateSpscChannel (ChannelStorage< U, kCapacity > &storage)
 

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