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

Overview

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

A sender which writes values to an asynchronous channel.

Public Member Functions

 Sender (const Sender &other)=delete
 
Senderoperator= (const Sender &other)=delete
 
 Sender (Sender &&other) noexcept
 
Senderoperator= (Sender &&other) noexcept
 
template<typename U >
SendFuture< T > Send (U &&value)
 
ReserveSendFuture< T > ReserveSend ()
 
Result< SendReservation< T > > TryReserveSend ()
 
Status TrySend (const T &value)
 
Status TrySend (T &&value)
 
Status BlockingSend (Dispatcher &dispatcher, const T &value, chrono::SystemClock::duration timeout=internal::Channel< T >::kWaitForever)
 
Status BlockingSend (Dispatcher &dispatcher, T &&value, chrono::SystemClock::duration timeout=internal::Channel< T >::kWaitForever)
 
void Disconnect ()
 
uint16_t remaining_capacity () const
 Returns the remaining capacity of the channel.
 
uint16_t capacity () const
 Returns the maximum capacity of the channel.
 
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< SpmcChannelHandle< U >, Sender< U > > > CreateSpmcChannel (Allocator &, uint16_t)
 
template<typename U , uint16_t kCapacity>
std::tuple< SpmcChannelHandle< U >, Sender< U > > CreateSpmcChannel (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: