RxCpp icon indicating copy to clipboard operation
RxCpp copied to clipboard

Integrating with the libuv timer

Open shtaif opened this issue 5 years ago • 1 comments

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 :) :)

shtaif avatar Jul 26 '19 19:07 shtaif

Hi!

One approach is the one taken by these integrations with ASIO

  1. https://github.com/pudae/example/blob/master/rx_test/rxasio/io_service.hpp
  2. 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

kirkshoop avatar Jul 28 '19 01:07 kirkshoop