C++ Actor Framework 1.0.0
|
Simple base type for all subscription implementations that implements the reference counting member functions. More...
#include <subscription.hpp>
Public Member Functions | |
void | ref_disposable () const noexcept override |
void | deref_disposable () const noexcept override |
void | ref_coordinated () const noexcept override |
Increases the reference count of the coordinated. | |
void | deref_coordinated () const noexcept override |
Decreases the reference count of the coordinated and destroys the object if necessary. | |
void | dispose () final |
void | cancel () final |
Signals that the observer is no longer interested in receiving items. | |
Public Member Functions inherited from caf::detail::plain_ref_counted | |
plain_ref_counted (const plain_ref_counted &) | |
plain_ref_counted & | operator= (const plain_ref_counted &) |
void | ref () const noexcept |
Increases reference count by one. | |
void | deref () const noexcept |
Decreases reference count by one and calls request_deletion when it drops to zero. | |
bool | unique () const noexcept |
Queries whether there is exactly one reference. | |
size_t | get_reference_count () const noexcept |
Queries the current reference count for this object. | |
Public Member Functions inherited from caf::flow::subscription::impl | |
virtual void | request (size_t n)=0 |
Signals demand for n more items. | |
Public Member Functions inherited from caf::flow::coordinated | |
virtual coordinator * | parent () const noexcept=0 |
Returns the coordinator this object lives on. | |
Friends | |
void | intrusive_ptr_add_ref (const impl_base *ptr) noexcept |
void | intrusive_ptr_release (const impl_base *ptr) noexcept |
Additional Inherited Members | |
Public Types inherited from caf::flow::subscription::impl | |
using | handle_type = subscription |
Protected Attributes inherited from caf::detail::plain_ref_counted | |
size_t | rc_ |
Related Symbols inherited from caf::flow::coordinated | |
using | coordinated_ptr = intrusive_ptr<coordinated> |
Simple base type for all subscription implementations that implements the reference counting member functions.
|
finalvirtual |
Signals that the observer is no longer interested in receiving items.
Only the observer may call this member function. The difference between cancel
and dispose
is that the latter will call on_complete
on the observer if it has not been called yet. Furthermore, dispose
has to assume that it has been called from outside of the event loop and thus usually schedules an event to clean up the subscription. In contrast, cancel
can assume that it has been called from within the event loop and thus can clean up the subscription immediately.
Implements caf::flow::subscription::impl.
|
overridevirtualnoexcept |
Decreases the reference count of the coordinated and destroys the object if necessary.
Implements caf::flow::coordinated.
|
overridevirtualnoexcept |
Increases the reference count of the coordinated.
Implements caf::flow::coordinated.