14#include <rpp/operators/fwd/subscribe_on.hpp>
15#include <rpp/sources/create.hpp>
16#include <rpp/subscribers/constraints.hpp>
18IMPLEMENTATION_FILE (subscribe_on_tag);
22template<constra
int::decayed_type Type, constra
int::observable_of_type<Type> TObs, schedulers::constra
int::scheduler TScheduler>
23auto subscribe_on_impl(TObs&& obs,
const TScheduler& scheduler)
25 return source::create<Type>([obs = std::forward<TObs>(obs), scheduler]<constraint::subscriber_of_type<Type> TSub>(TSub&& subscriber)
27 auto worker = scheduler.create_worker(subscriber.get_subscription());
28 worker.schedule([obs, subscriber = std::forward<TSub>(subscriber)]()
mutable ->schedulers::optional_duration
30 obs.subscribe(std::move(subscriber));