RxCpp
RxCpp copied to clipboard
Integrating with the libuv timer
Hi,
I'm trying to integrate rxcpp into libuv, utilizing it's timers, thread pool, etc. through the rxcpp constructs.
I'm currently trying to make a scheduler which delegates the scheduling over to libuv. As part of this I guess I need to implement different versions of logic for either "timer" operations and "interval" operations.
How would you recommend me to go about that? :) I'm kind of new to the library and still struggling to grasp these concepts and their relations.
Thank you :) :)
Hi!
One approach is the one taken by these integrations with ASIO
- https://github.com/pudae/example/blob/master/rx_test/rxasio/io_service.hpp
- https://gist.github.com/windoze/a6e684143833d5d65ba6
Another approach is to use the run_loop
scheduler, as the twitter app does, to integrate with the SDL event loop.
- https://github.com/kirkshoop/twitter/blob/master/main.cpp#L1772
- https://github.com/kirkshoop/twitter/blob/master/main.cpp#L399