5 #if !defined(RXCPP_RX_SCHEDULER_IMMEDIATE_HPP) 6 #define RXCPP_RX_SCHEDULER_IMMEDIATE_HPP 8 #include "../rx-includes.hpp" 12 namespace schedulers {
23 typedef immediate_worker this_type;
24 immediate_worker(
const this_type&);
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>();
Definition: rx-scheduler.hpp:163
Definition: rx-all.hpp:26
bool is_subscribed() const
Definition: rx-scheduler.hpp:585
controls lifetime for scheduler::schedule and observable<T, SourceOperator>::subscribe.
Definition: rx-subscription.hpp:364
allows functions to be called at specified times and possibly in other contexts.
Definition: rx-scheduler.hpp:383
recursion is used by the scheduler to signal to each action whether tail recursion is allowed...
Definition: rx-scheduler.hpp:95
const recurse & get_recurse() const
get the recurse to pass into each action being called
Definition: rx-scheduler.hpp:116
Definition: rx-scheduler.hpp:353
Definition: rx-scheduler.hpp:426
const scheduler & make_immediate()
Definition: rx-immediate.hpp:75
Definition: rx-scheduler.hpp:200