ReactivePlusPlus
ReactiveX implementation for C++20
Loading...
Searching...
No Matches
rpp::blocking_observable< Type, Strategy > Class Template Reference

Extension over rpp::observable with set of blocking operators - it waits till completion of underlying observable. More...

#include <blocking_observable.hpp>

Additional Inherited Members

Public Types inherited from rpp::observable< Type, details::observables::blocking_strategy< Type, Strategy > >
using value_type
using strategy_type
using optimal_disposables_strategy
Public Member Functions inherited from rpp::observable< Type, details::observables::blocking_strategy< Type, Strategy > >
 observable (Args &&... args)
void subscribe (observer< Type, ObserverStrategy > &&observer) const
 Subscribes passed observer to emissions from this observable.
composite_disposable_wrapper subscribe_with_disposable (observer< Type, ObserverStrategy > &&observer) const
 Subscribes passed observer to emissions from this observable.
auto as_dynamic () const &
 Convert observable to type-erased version.
auto operator| (Subscribe &&op) const
auto pipe (Op &&op) const &

Detailed Description

template<constraint::decayed_type Type, constraint::observable_strategy< Type > Strategy>
class rpp::blocking_observable< Type, Strategy >

Extension over rpp::observable with set of blocking operators - it waits till completion of underlying observable.

Example:
| rpp::operators::delay(std::chrono::seconds{1}, rpp::schedulers::new_thread{}) // <-- emit from another thread with delay
| rpp::operators::subscribe([](int) {}, []() { std::cout << "COMPLETED" << std::endl; });
std::cout << "done" << std::endl;
// output: COMPLETED done

The documentation for this class was generated from the following file: