Open akowalew opened 6 years ago
OK, thanks. I'll consider adding something like this in the future. As I have mentioned already in other tickets, I don't have much time to spend on this project and I don't think I will come around to doing something here until May or event later.
Hi!
In my embedded application, which is based mainly on your
EventLoop
, I have to use 3rd party library. This library is written in pure C and needs to be polled from main loop cyclically:There is a need to extend
EventLoop
, by adding something likerunOnce()
. It will be similar to the Boost::Asio'sio_service::run_one()
or ROS'sros::spinOnce()
. It has to execute only one event and return back to the caller. I have implemented this, by adding to theEventLoop
code like this:It has of course one serious disadvantage: it is not invoking
cond_.wait(lock_);
, but it allows now to useEventLoop
with 3rd party libraries:I think it would be nice to have this feature in
embxx
.