#include <rpp/rpp.hpp>
#include <iostream>
int main()
{
std::cout << std::this_thread::get_id() << std::endl;
rpp::source::create<int>([](const auto& sub)
{
std::cout << "on_subscribe thread " << std::this_thread::get_id() << std::endl;
sub.on_next(1);
sub.on_completed();
})
.as_blocking()
.subscribe([](int v) { std::cout << "[" << std::this_thread::get_id() << "] : " << v << "\n"; });
return 0;
}
scheduler which schedules execution of schedulables via queueing tasks to another thread with priorit...
Definition: new_thread_scheduler.hpp:32