ReactivePlusPlus
ReactiveX implementation for C++20
|
Schedules execution of schedulables via queueing tasks to the caller thread with priority to time_point and order. More...
#include <current_thread.hpp>
Classes | |
struct | is_queue_is_empty |
class | worker_strategy |
Static Public Member Functions | |
static details::schedulables_queue< worker_strategy > *& | get_queue () |
static void | drain_queue () noexcept |
static own_queue_guard | own_queue_and_drain_finally_if_not_owned () |
static rpp::schedulers::worker< worker_strategy > | create_worker () |
Friends | |
class | new_thread |
Schedules execution of schedulables via queueing tasks to the caller thread with priority to time_point and order.
schedule
called.When this scheduler passed to some operators, then caller thread is thread where scheduling of some action happens. In most cases it is where on_next
was called.
rpp::source::just
source uses it as default scheduler as well as rpp::operators::merge
operator (which just "owns" it during subscription).For example, this one
Procedes output 1 4 2 5 3 6
due to merge_with
takes ownership over this scheduler during subscription, both sources schedule their first emissions into scheduler, then merge_with
frees scheduler and it starts to proceed scheduled actions. As a result it continues interleaving of values. In case of usingg rpp::schedulers::immediate
it would be:
With output 1 2 3 4 5 6