#include <rpp/rpp.hpp>
#include "rpp/sources/fwd.hpp"
#include <iostream>
int main()
{
std::cout << "value in map" << v << std::endl;
return v;
})
std::cout << "CONNECT" << std::endl;
auto d = observable.connect();
std::this_thread::sleep_for(std::chrono::milliseconds{150});
std::cout << "SUBSCRIBE" << std::endl;
observable.subscribe([](int v) { std::cout << "observer value " << v << std::endl; });
std::this_thread::sleep_for(std::chrono::milliseconds{150});
d.dispose();
std::cout << "DISPOSE" << std::endl;
std::this_thread::sleep_for(std::chrono::milliseconds{150});
}
Scheduler which schedules invoking of schedulables to another thread via queueing tasks with priority...
Definition new_thread.hpp:31
auto publish()
Converts ordinary observable to rpp::connectable_observable with help of inline instsantiated publish...
Definition publish.hpp:22
auto interval(rpp::schedulers::duration initial, rpp::schedulers::duration period, TScheduler &&scheduler)
Creates rpp::observable that emits a sequential integer every specified time interval,...
Definition interval.hpp:72