ReactivePlusPlus
One more implementation of ReactiveX approach in C++ with care about performance and templates in mind
 
Loading...
Searching...
No Matches
run_loop.cpp
#include <rpp/rpp.hpp>
#include <iostream>
int main()
{
auto run_loop = rpp::schedulers::run_loop{};
auto sub = rpp::source::just(10, 15, 20)
.observe_on(run_loop)
.subscribe([](int v) { std::cout << v << "\n"; });
// No output
while (sub.is_subscribed())
{
while (run_loop.is_any_ready_schedulable())
run_loop.dispatch();
}
// Output:
// 10
// 15
// 20
return 0;
}
scheduler which schedules execution via queueing tasks, but execution of tasks should be manually dis...
Definition: run_loop_scheduler.hpp:30