ReactivePlusPlus
One more implementation of ReactiveX approach in C++ with care about performance and templates in mind
 
Loading...
Searching...
No Matches
rpp::subjects::publish_subject< T > Class Template Reference

Subject which just multicasts values to observers subscribed on it. It contains two parts: subscriber and observable at the same time. More...

#include <publish_subject.hpp>

Inheritance diagram for rpp::subjects::publish_subject< T >:
rpp::subjects::details::base_subject< T, details::publish_strategy< T > > rpp::subjects::details::subject_tag

Public Member Functions

 publish_subject (const composite_subscription &sub)
 
 publish_subject (composite_subscription &&sub=composite_subscription{})
 
- Public Member Functions inherited from rpp::subjects::details::base_subject< T, details::publish_strategy< T > >
auto get_subscriber () const
 
auto get_observable () const
 

Additional Inherited Members

- Protected Member Functions inherited from rpp::subjects::details::base_subject< T, details::publish_strategy< T > >
 base_subject (auto &&...args)
 
const Strategy & get_strategy () const
 

Detailed Description

template<rpp::constraint::decayed_type T>
class rpp::subjects::publish_subject< T >

Subject which just multicasts values to observers subscribed on it. It contains two parts: subscriber and observable at the same time.

Each subscriber obtains only values which emitted after corresponding subscribe. on_error/on_completer/unsubscribe cached and provided to new subscribers if any

Warning
this subject is not synchronized/serialized! It means, that expected to call callbacks of subscriber in the serialized way to follow observable contract: "Observables must issue notifications to observers serially (not in parallel).". If you are not sure or need extra serialization, please, use serialized_subject.
Template Parameters
Tvalue provided by this subject
See also
https://reactivex.io/documentation/subject.html
Examples
multicast.cpp, and timeout.cpp.

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