RxCpp
The Reactive Extensions for Native (RxCpp) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in both C and C++.
|
Go to the documentation of this file.
5 #if !defined(RXCPP_RX_SCHEDULER_IMMEDIATE_HPP)
6 #define RXCPP_RX_SCHEDULER_IMMEDIATE_HPP
8 #include "../rx-includes.hpp"
12 namespace schedulers {
26 virtual ~immediate_worker()
33 virtual clock_type::time_point
now()
const {
34 return clock_type::now();
37 virtual void schedule(
const schedulable& scbl)
const {
45 virtual void schedule(clock_type::time_point when,
const schedulable& scbl)
const {
46 std::this_thread::sleep_until(when);
55 std::shared_ptr<immediate_worker> wi;
59 : wi(std::make_shared<immediate_worker>())
66 virtual clock_type::time_point
now()
const {
67 return clock_type::now();
71 return worker(std::move(cs), wi);
76 static scheduler instance = make_scheduler<immediate>();
recursion is used by the scheduler to signal to each action whether tail recursion is allowed.
Definition: rx-scheduler.hpp:95
Definition: rx-scheduler.hpp:353
Definition: rx-scheduler.hpp:200
bool is_subscribed() const
Definition: rx-scheduler.hpp:592
Definition: rx-scheduler.hpp:426
const recurse & get_recurse() const
get the recurse to pass into each action being called
Definition: rx-scheduler.hpp:116
allows functions to be called at specified times and possibly in other contexts.
Definition: rx-scheduler.hpp:383
Definition: rx-scheduler.hpp:163
const scheduler & make_immediate()
Definition: rx-immediate.hpp:75
controls lifetime for scheduler::schedule and observable<T, SourceOperator>::subscribe.
Definition: rx-subscription.hpp:459
Definition: rx-all.hpp:26