ReactivePlusPlus
ReactiveX implementation for C++20
|
Observable is the source of any Reactive Stream. More...
Concepts | |
concept | rpp::constraint::observable_strategy |
A concept that defines the requirements for an observable strategy. | |
Classes | |
class | rpp::blocking_observable< Type, Strategy > |
Extension over rpp::observable with set of blocking operators - it waits till completion of underlying observable. More... | |
class | rpp::connectable_observable< OriginalObservable, Subject > |
Extension over raw observable with ability to be manually connected at any time or ref_counting (sharing same observable between multiple observers) More... | |
class | rpp::dynamic_observable< Type > |
Type-erased version of the rpp::observable . Any observable can be converted to dynamic_observable via rpp::observable::as_dynamic member function. More... | |
class | rpp::grouped_observable< KeyType, Type, Strategy > |
Extension over rpp::observable for some "subset" of values from original observable grouped by some key. It has get_key() member function. Used in group_by operator to represent grouped observable. More... | |
class | rpp::observable< Type, Strategy > |
Base class for any observable used in RPP. It handles core callbacks of observable. More... | |
class | rpp::variant_observable< Type, Observables > |
Extension over rpp::observable to provide ability statically keep one of multiple observables. More... | |
Observable is the source of any Reactive Stream.
Observable is the source of any Reactive Stream. Observable provides ability to subscribe observer on stream of events. After subscription observable would emit values to observer.
Reactive programming has an Observable Contract. Please read it.
This contract includes:
Observables must issue notifications to observers serially (not in parallel). They may issue these notifications from different threads, but there must be a formal happens-before relationship between the notifications.
RPP follows this contract, meaning:
take
operator doesn't use mutexes or atomics due to underlying observable MUST emit items seriallycreate
, follow this contract!For example:
This will never produce:
Only serially: