5 #if !defined(RXCPP_RX_SCHEDULER_SAME_WORKER_HPP) 6 #define RXCPP_RX_SCHEDULER_SAME_WORKER_HPP 8 #include "../rx-includes.hpp" 12 namespace schedulers {
24 : controller(std::move(w))
31 virtual clock_type::time_point
now()
const {
32 return controller.
now();
38 auto token = inner_lifetime.
add(cs);
39 cs.
add([inner_lifetime, token](){inner_lifetime.remove(token);});
40 return worker(cs, controller);
45 return make_scheduler<same_worker>(std::move(w));
virtual ~same_worker()
Definition: rx-sameworker.hpp:27
Definition: rx-all.hpp:26
controls lifetime for scheduler::schedule and observable<T, SourceOperator>::subscribe.
Definition: rx-subscription.hpp:364
Definition: rx-sameworker.hpp:14
const composite_subscription & get_subscription() const
Definition: rx-scheduler.hpp:225
allows functions to be called at specified times and possibly in other contexts.
Definition: rx-scheduler.hpp:383
scheduler make_same_worker(rxsc::worker w)
Definition: rx-sameworker.hpp:44
clock_type::time_point now() const
return the current time for this worker
Definition: rx-scheduler.hpp:253
virtual worker create_worker(composite_subscription cs) const
Definition: rx-sameworker.hpp:35
same_worker(rxsc::worker w)
Definition: rx-sameworker.hpp:23
weak_subscription add(subscription s) const
Definition: rx-subscription.hpp:413
Definition: rx-scheduler.hpp:353
virtual clock_type::time_point now() const
Definition: rx-sameworker.hpp:31
Definition: rx-scheduler.hpp:200