diff options
author | Elliott Hughes <enh@google.com> | 2022-09-01 14:59:27 +0000 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2022-09-01 15:00:13 +0000 |
commit | a6661d2cf339b71de3e25f80fb927e029468c603 (patch) | |
tree | c0b1aac3621dd301e9fb7add9170d8879cc97cbe /Rx/v2/examples/doxygen/skip_until.cpp | |
parent | de986f59e99bd585280a061f545150ee1268f012 (diff) | |
download | RxCpp-a6661d2cf339b71de3e25f80fb927e029468c603.tar.gz |
Do not necromance this without going through the go/android-3p process
again.
Test: treehugger
Change-Id: Id813d74d7d2597e0636b925430117c94bea3fa5a
Diffstat (limited to 'Rx/v2/examples/doxygen/skip_until.cpp')
-rw-r--r-- | Rx/v2/examples/doxygen/skip_until.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/Rx/v2/examples/doxygen/skip_until.cpp b/Rx/v2/examples/doxygen/skip_until.cpp deleted file mode 100644 index d99cb6e..0000000 --- a/Rx/v2/examples/doxygen/skip_until.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "rxcpp/rx.hpp" - -#include "rxcpp/rx-test.hpp" -#include "catch.hpp" - -SCENARIO("skip_until sample"){ - printf("//! [skip_until sample]\n"); - auto source = rxcpp::observable<>::interval(std::chrono::milliseconds(10)).take(7); - auto trigger = rxcpp::observable<>::timer(std::chrono::milliseconds(25)); - auto values = source.skip_until(trigger); - values. - subscribe( - [](long v){printf("OnNext: %ld\n", v);}, - [](){printf("OnCompleted\n");}); - printf("//! [skip_until sample]\n"); -} - -#include "main.hpp" - -SCENARIO("threaded skip_until sample"){ - printf("//! [threaded skip_until sample]\n"); - printf("[thread %s] Start task\n", get_pid().c_str()); - auto source = rxcpp::observable<>::interval(std::chrono::milliseconds(10)).take(7).map([](long v){ - printf("[thread %s] Source emits, value = %ld\n", get_pid().c_str(), v); - return v; - }); - auto trigger = rxcpp::observable<>::timer(std::chrono::milliseconds(25)).map([](long v){ - printf("[thread %s] Trigger emits, value = %ld\n", get_pid().c_str(), v); - return v; - }); - auto values = source.skip_until(trigger, rxcpp::observe_on_new_thread()); - values. - as_blocking(). - subscribe( - [](long v){printf("[thread %s] OnNext: %ld\n", get_pid().c_str(), v);}, - [](){printf("[thread %s] OnCompleted\n", get_pid().c_str());}); - printf("[thread %s] Finish task\n", get_pid().c_str()); - printf("//! [threaded skip_until sample]\n"); -} |