C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::async::consumer_adapter< T > Class Template Reference

Integrates an SPSC buffer consumer into an asynchronous event loop. More...

#include <consumer_adapter.hpp>

Public Types

using impl_ptr = intrusive_ptr<impl>
 

Public Member Functions

 consumer_adapter (const consumer_adapter &)=delete
 
consumer_adapteroperator= (const consumer_adapter &)=delete
 
 consumer_adapter (consumer_adapter &&)=default
 
consumer_adapteroperator= (consumer_adapter &&)=default
 
 consumer_adapter (impl_ptr ptr)
 
consumer_adapteroperator= (std::nullptr_t)
 
template<class Policy >
read_result pull (Policy policy, T &result)
 
void cancel ()
 
error abort_reason () const noexcept
 
 operator bool () const noexcept
 
bool has_data () const noexcept
 
bool has_consumer_event () const noexcept
 

Static Public Member Functions

static consumer_adapter make (spsc_buffer_ptr< T > buf, execution_context_ptr ctx, action do_wakeup)
 
static std::optional< consumer_adaptermake (consumer_resource< T > res, execution_context_ptr ctx, action do_wakeup)
 

Related Symbols

(Note that these are not member symbols.)

template<class T >
consumer_adapter< T > make_consumer_adapter (spsc_buffer_ptr< T > buf, execution_context_ptr ctx, action do_wakeup)
 
template<class T >
std::optional< consumer_adapter< T > > make_consumer_adapter (consumer_resource< T > res, execution_context_ptr ctx, action do_wakeup)
 

Detailed Description

template<class T>
class caf::async::consumer_adapter< T >

Integrates an SPSC buffer consumer into an asynchronous event loop.

Friends And Related Symbol Documentation

◆ make_consumer_adapter()

template<class T >
consumer_adapter< T > make_consumer_adapter ( spsc_buffer_ptr< T > buf,
execution_context_ptr ctx,
action do_wakeup )
related
Precondition
buf != nullptr

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