#include <rpp/rpp.hpp>
#include <iostream>
int main()
{
std::cout << std::this_thread::get_id() << std::endl;
std::cout << "on_subscribe thread " << std::this_thread::get_id() << std::endl;
sub.on_next(1);
sub.on_completed();
})
std::cout << std::this_thread::get_id() << std::endl;
return 0;
}
Scheduler which schedules invoking of schedulables to another thread via queueing tasks with priority...
Definition new_thread.hpp:31
auto create(OnSubscribe &&on_subscribe)
Construct observable specialized with passed callback function. Most easiesest way to construct obser...
Definition create.hpp:57
auto subscribe(observer< Type, ObserverStrategy > &&observer)
Subscribes passed observer to emissions from this observable.
Definition subscribe.hpp:226
auto as_blocking()
Converts rpp::observable to rpp::blocking_observable
Definition as_blocking.hpp:47
auto subscribe_on(Scheduler &&scheduler)
OnSubscribe function for this observable will be scheduled via provided scheduler.
Definition subscribe_on.hpp:75