Skip to content

Instantly share code, notes, and snippets.

View jspanchu's full-sized avatar
🦈
Gotta do what you gotta do

Jaswant Panchumarti jspanchu

🦈
Gotta do what you gotta do
View GitHub Profile
@jspanchu
jspanchu / rxcpp_subjects.cpp
Last active December 22, 2022 04:04
rxcpp subjects
// clang-format off
/**
* Description:
* Difference between various rxcpp subjects (SimpleSubject, BehaviorSubject and ReplaySubject)
* Compile:
* $ g++ -I/path/to/RxCpp/Rx/v2/src -g -Wall -Wextra -Werror -Wunused -std=gnu++17 rxcpp_subjects.cpp -o rxcpp_subjects -lpthread -ldl
* Run:
* $ ./main [-s] [-r] [-b] [-t <wait_before_subscribe (in ms)>]
* -b: BehaviourSubject
* -r: ReplaySubject