C++ Actor Framework 1.0.0
|
Internal interface of a subscription
.
More...
#include <subscription.hpp>
Public Types | |
using | handle_type = subscription |
Public Member Functions | |
virtual void | cancel ()=0 |
Signals that the observer is no longer interested in receiving items. | |
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. | |
virtual void | ref_coordinated () const noexcept=0 |
Increases the reference count of the coordinated. | |
virtual void | deref_coordinated () const noexcept=0 |
Decreases the reference count of the coordinated and destroys the object if necessary. | |
Additional Inherited Members | |
Related Symbols inherited from caf::flow::coordinated | |
using | coordinated_ptr = intrusive_ptr<coordinated> |
Internal interface of a subscription
.
|
pure virtual |
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.
Implemented in caf::flow::op::from_resource_sub< Buffer >, and caf::flow::subscription::impl_base.
|
pure virtual |
Signals demand for n
more items.
Implemented in caf::flow::op::cell_sub< T >, caf::flow::op::concat_sub< T >, caf::flow::op::from_resource_sub< Buffer >, caf::flow::op::merge_sub< T >, caf::flow::op::sample_sub< T >, caf::flow::op::zip_with_sub< F, Ts >, and caf::flow::subscription::fwd_impl.