C++ Actor Framework 1.0.0
|
Integrates an SPSC buffer producer into an asynchronous event loop. More...
#include <producer_adapter.hpp>
Public Types | |
using | impl_ptr = intrusive_ptr<impl> |
Public Member Functions | |
producer_adapter (const producer_adapter &)=delete | |
producer_adapter & | operator= (const producer_adapter &)=delete |
producer_adapter (producer_adapter &&)=default | |
producer_adapter & | operator= (producer_adapter &&)=default |
producer_adapter (impl_ptr ptr) | |
producer_adapter & | operator= (std::nullptr_t) |
size_t | push (const T &item) |
Makes item available to the consumer. | |
size_t | push (span< const T > items) |
Makes items available to the consumer. | |
void | close () |
void | abort (error reason) |
operator bool () const noexcept | |
Static Public Member Functions | |
static producer_adapter | make (spsc_buffer_ptr< T > buf, execution_context_ptr ctx, action do_resume, action do_cancel) |
static std::optional< producer_adapter > | make (producer_resource< T > res, execution_context_ptr ctx, action do_resume, action do_cancel) |
Related Symbols | |
(Note that these are not member symbols.) | |
template<class T > | |
producer_adapter< T > | make_producer_adapter (spsc_buffer_ptr< T > buf, execution_context_ptr ctx, action do_resume, action do_cancel) |
template<class T > | |
std::optional< producer_adapter< T > > | make_producer_adapter (producer_resource< T > res, execution_context_ptr ctx, action do_resume, action do_cancel) |
Integrates an SPSC buffer producer into an asynchronous event loop.
|
static |
buf != nullptr
size_t caf::async::producer_adapter< T >::push | ( | const T & | item | ) |
Makes item
available to the consumer.
size_t caf::async::producer_adapter< T >::push | ( | span< const T > | items | ) |
Makes items
available to the consumer.
|
related |
buf != nullptr