#include <rpp/rpp.hpp>
#include <iostream>
int main()
{
{
observable.subscribe([](int v) { std::cout << "#1 " << v << std::endl; });
observable.subscribe([](int v) { std::cout << "#2 " << v << std::endl; });
observable.connect();
}
{
observable.subscribe([](int v) { std::cout << "#1 " << v << std::endl; });
observable.subscribe([](int v) { std::cout << "#2 " << v << std::endl; });
observable.connect();
}
{
observable.subscribe([](int v) { std::cout << "#1 " << v << std::endl; });
observable.subscribe([](int v) { std::cout << "#2 " << v << std::endl; });
observable.connect();
}
return 0;
}
Subject which just multicasts values to observers subscribed on it. It contains two parts: observer a...
Definition publish_subject.hpp:81
auto publish()
Converts ordinary observable to rpp::connectable_observable with help of inline instsantiated publish...
Definition publish.hpp:22
auto multicast()
Converts ordinary observable to rpp::connectable_observable with help of inline instsantiated subject...
Definition multicast.hpp:85
auto just(const TScheduler &scheduler, T &&item, Ts &&... items)
Creates rpp::observable that emits a particular items and completes.
Definition from.hpp:201