3 ms·
Message passing across threads is very easy with boost asio: you just post a callback to the respective io_service. That is effectively what Qt does anyway, but
by cheez 12y ago
Message passing across threads is very easy with boost asio: you just post a callback to the respective io_service. That is effectively what Qt does anyway, but no Qt required.
- netheril96 12y agoExcept when you need to pass a message to the GUI thread (main thread).
- cheez 12y agoWhy is that hard? With Qt, it's fairly straightforward: http://ix.io/flo http://ix.io/flo Similar things can be used for the various event loops. If you were so inclined, you could write something that uses less dynamic memory allocation. Now that I read that code, I think I should be moving some of this stuff to C++11, at least WRT rvalue-refs...