Subject: Re: [boost] boost] [asio] intergrate with message loop how to
From: microcai (microcai_at_[hidden])
Date: 2014-05-13 03:42:35
2014-05-09 20:08 GMT+08:00 Nat Goodspeed <nat_at_[hidden]>:
> On May 9, 2014, at 6:18 AM, microcai <microcai_at_[hidden]> wrote:
>> 2014-05-05 21:57 GMT+08:00 Nat Goodspeed <nat_at_[hidden]>:
>>> Perhaps you might propose a cross-platform asio API extension that could give you control at the times you want, using the completion-handler mechanism?
>> then there will be endless ways of loops that you need to integrated
>> into asio. glib, qt, WIN32 message loop ... etc.
> Understood. I am not proposing that specific message-loop code be absorbed into Asio. I am asking whether you (or any interested reader) might be able to define an extension API that permits / facilitates a consuming Asio application to integrate with any required message loop.
some thing like io_service::wait_events(); but , does not dispatch
the event. I can run seperated thread to call this, then post message
to gui thread, let gui thread run io_service::poll() to dispatch the
if the hander is executed in gui thread, we can avoid lots of
synchronization code between gui thread and asio thread( if
io_service::run() has to be run in seperated thread. ).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk