MCPcopy Create free account
hub / github.com/AlexInLog/ReactivePlusPlus / on_next

Method on_next

src/rpp/rpp/operators/take.hpp:31–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30 template<typename T>
31 void on_next(T&& v) const
32 {
33 if (count > 0)
34 {
35 --count;
36 observer.on_next(std::forward<T>(v));
37 }
38
39 if (count == 0)
40 observer.on_completed();
41 }
42
43 void on_error(const std::exception_ptr& err) const { observer.on_error(err); }
44

Callers

nothing calls this directly

Calls 1

on_completedMethod · 0.45

Tested by

no test coverage detected