Boost logo

Boost :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2007-09-14 12:32:13


On 9/11/07, Christopher Kohlhoff <chris_at_[hidden]> wrote:
>

Hi Christopher,

> Asio is not really intended for those use cases as, in general, user
> interface events follow quite a different model to things like files and
> sockets.

I'm writing a GUI library based on win32gui use syntax. It is still at
an very early development phase. But it seem to me it would really
benefit from io_service demuxer. And should reduce greatly threading
bugs from the user.

> If you want to integrate events from these sources the easiest
> approach is probably to wait for them externally to asio and then use
> io_service::post() to execute the handlers (or alternatively write a
> custom asio service to do the same thing),

The parenthesed proposal seem the best to me.

> but since you're not using
> asio for anything else it doesn't seem worth it to me. You're welcome to
> reuse any bits of asio that you find useful, though.

IMO, using io_service for GUI/input could greatly improve portability,
and when using IO it would be a lot easier to make the application
responsive by using asynchronous IO. Then the whole application
becomes async.

> Cheers,
> Chris

Best regards,

-- 
Felipe Magno de Almeida

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk