ReactivePlusPlus
One more implementation of ReactiveX approach in C++ with care about performance and templates in mind
 
Loading...
Searching...
No Matches
sample.cpp
#include <rpp/rpp.hpp>
#include <iostream>
int main()
{
rpp::source::interval(std::chrono::milliseconds{100}, rpp::schedulers::trampoline{})
.sample_with_time(std::chrono::milliseconds{300}, rpp::schedulers::trampoline{})
.take(5)
.subscribe([](int v) { std::cout << v << " "; });
// Output: 1 4 7 10 13
return 0;
}
Schedules execution of schedulables via queueing tasks to the caller thread with priority to time_poi...
Definition: trampoline_scheduler.hpp:41