Closed minixxie closed 9 years ago
You can schedule calls to run_one from within the Qt event loop. Maybe the other way around is also possible. You can run multiple threads, each with its own event loop.
I haven't tested any of these approaches. These approaches would be my first steps if I had your problem.
Thank you for your instant reply! Just found a post: http://www.qtcentre.org/threads/53229-How-to-integrate-asio-io_service-with-Qt-event-loop The guy peper0 wrote such project: https://github.com/peper0/qtasio It seems like I could try this? Regards, Simon
Seems like you found the answer, if you aren't restricted by "must run on Windows", like warned on the forum you mentioned.
Thank you. We don't use M$ windows for servers. So I'm comfortable with the POSIX compatability.
May I continue asking about this question? it seems that scheduling calls to run_one is somehow like kind of polling?
run_one is somehow like kind of polling?
You don't ask which socket is ready, one by one. You ask if there are ready tasks. But I agree that is nonoptimal.
The forum you mentioned already has a discussion on the topic. it's better than I have to offer.
Hi, I'd like to try this framework with a redis DB store behind. as I know, this framework is using the Qt event loop, while this api ( https://github.com/nekipelov/redisclient ) is using the boost.asio event loop. It seems to me that it is impossible to integrate two frameworks with two different kinds of event loop. Could you please give me some advice? Thanks & Regards, Simon