|
Boost : |
From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2005-12-10 21:27:12
Hi Simon,
--- simon meiklejohn <simon_at_[hidden]> wrote:
> However, locking_dispatcher has fairly simple innards,
> and a win32_pump_dispatcher would require an
> implementation thats a lot like asio::demuxer -i.e. with
> an internal queue of Handlers. Opportunity for re-use?
Absolutely. If asio does get accepted into boost, it would be good to
factor out reusable bits of the implementation and/or replace them with
some other boost library.
> I can't see anything in the demuxer interface which limits it
> purely this role. Its applicability seems entirely general.
> (abstracted deferral of Handlers, which in reality can be
> 'handling' anything).
It's currently a limitation imposed by the services it provides. E.g.
the default stream_socket implementation on Win32, which uses
overlapped I/O and I/O completion ports, assumes that the demuxer is
also implemented using I/O completion ports. I think it would be
possible to break this coupling, but it is likely to be at a
performance cost. In my thinking to date, socket I/O is just a facet of
the demuxer, hidden behind a friendlier interface.
Cheers,
Chris
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk