From: Don G (dongryphon_at_[hidden])
Date: 2005-03-30 10:49:46
Thanks for contributing to these discussions! I hope that with you
and the others involved we can get this long overdue library off the
ground. Anyway, to respond to your question:
--- Robert Ramey wrote:
> The question here is:
> Is aio.h interface not sufficient in some way? If not, what
> facility is it missing? If it is sufficient, then just
> depend on the available implementation or re-implement the
> interface in the most convenient way.
> Robert Ramey
IMHO, the "io" part of "aio" is the primary thing what makes it
insufficient. Unless I misread the man pages, I cannot post custom
events or messages with aio; it is all about I/O on file descriptors.
Which brings me to the other problem.
At least on Windows, a file != socket != pipe != etc (regardless of
the quasi-polymorphic WaitForXXX functions). If we constrain the
discussion only to sockets, then this approach could be used. Sadly,
pipes are a totally different ball game. If memory serves, the CygWin
folks "mapped" all such types of objects to fd's, but doing so was
very heavy handed. There was no other solution to their particular
problem, but that is not the case here since we can invent the
The first issue is what spawned to Asynchronicity thread: given a
general async mechanism, I/O could be easily adapted to it. The
interface could be portable, even given the diverse ways and means
necessary to achieve the goal.
If we are to adopt an existing interface, I believe that it should be
general enough for non-I/O uses. It should also be something that
could be implemented on all platforms without undue inefficiency
(something a select-style interface could not do, IMO, because of the
poor performance of populating fd_set's or their moral equivalent).
In a previous post I showed that the async technique I am proposing
could be (fairly<g>) easily used to shield the application from
library worker thread issues. With a little more work (and coupling),
the use of channel.async_call could be encapsulated/automated to
simplify the user experience.
Do you Yahoo!?
Make Yahoo! your home page
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk