ReactivePlusPlus
One more implementation of ReactiveX approach in C++ with care about performance and templates in mind
 
Loading...
Searching...
No Matches
observe_on.cpp
#include <rpp/rpp.hpp>
#include <iostream>
int main()
{
std::cout << std::this_thread::get_id() << std::endl;
rpp::source::just(10, 15, 20)
.as_blocking()
.subscribe([](int v) { std::cout << "[" << std::this_thread::get_id() << "] : " << v << "\n"; });
// Template for output:
// TH1
// [TH2]: 10
// [TH2]: 15
// [TH2]: 20
return 0;
}
scheduler which schedules execution of schedulables via queueing tasks to another thread with priorit...
Definition: new_thread_scheduler.hpp:32