From the course: Functional Programming in C++
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Coroutine with RxCpp and ranges - C++ Tutorial
From the course: Functional Programming in C++
Coroutine with RxCpp and ranges
- [Instructor] Modern C++20 introduces coroutines and ranges, making building lazy asynchronous pipelines easier. Coroutines function to suspend and resume execution, while ranges simplify the processing of collections. By integrating RxCPP with coroutines and ranges, we can create efficient Reactive workflows. So here, I'm just in some code, and we're going to kind of start from scratch right here. And we're going to begin by creating an RxCPP observable, so rxcpp:: observable. It is of type [Interviewer], and we're going to call this observable generate_values. And all it's going to do here is we're going to have a return statement, and then we're going to define rxcpp::observable<>::create, rxcpp::observable<>::create And to this function we are going to pass, you guessed it, a Lambda. And inside of here we're going to pass a subscriber, which is of type rxcpp::subscriber<int> and we're going to call it subscriber. And next we're going to have a for loop, which is going to be a…
Contents
-
-
-
-
-
-
-
-
-
Functional reactive programming1m 4s
-
(Locked)
Simple RxCpp stream2m 57s
-
(Locked)
Coroutine with RxCpp and ranges7m 40s
-
(Locked)
Real-time data stream processing in a functional manner5m 9s
-
(Locked)
Benefits of functional programming for asynchronous event handling9m 5s
-
(Locked)
Challenge: Word frequency counter with RxCpp27s
-
(Locked)
Solution: Word frequency counter with RxCpp5m 46s
-
-
-
-
-