Boost logo

Boost :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2008-08-07 04:52:37

On Thu, Aug 7, 2008 at 5:33 AM, dizzy <dizzy_at_[hidden]> wrote:
> On Thursday 07 August 2008 04:00:39 Felipe Magno de Almeida wrote:
>> I'm writing a GUI library, and I wanted to use the asio concepts in it.
>> For example, I find it very compelling that every window has a
>> member-function that returns a io_service::strand to which one
>> can post messages to the window thread.
>> This would work well with all mainstream toolkits and the win32 API.
>> But how would this work with asio implementation?
>> Can a service be appended to a io_service, and have its own
>> demultiplexer function control the thread running the run member
>> function?
> You can make your own service that has a thread of its own (like the resolver
> service does) and from it you can post() events to the io_service event queue
> so that the thread(s) that perform run() on the io_service will handle them.
> This is a pretty generic way one can handle any asynchronous sources to asio
> (by using additional threads).

That won't work. I have to wait for events on the thread that run is
running in, which
is the user thread and is the same that creates the windows.

> --
> Mihai RUSU Email: dizzy_at_[hidden]


Felipe Magno de Almeida

Boost list run by bdawes at, gregod at, cpdaniel at, john at