apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Mansion" <ja...@wgold.demon.co.uk>
Subject RE: io abstractions
Date Mon, 26 Jun 2006 20:59:19 GMT
>The API is not unified because some platforms (notably, Windows) do
>not allow for unification of the various types. There were problems

In all fairness, that's misinformation.  Its true iff your regard
select() as the unification point, but select() is only a band-aid
on Win32, and was not well standardised on POSIX anyway (at least
with de jure standards) until better solutions were in use.  Your
view of unification on UNIX would be different if you wanted to
use aio, too.

I think the problem is that the reactive select-style IO is a
bad choice - even on UNIX.  Better to use a model that looks
at completions of async requests - it can be implemented
natively with a wider choice of mechanisms (whether Win32
overlapped IO - which does unify different IO endpoints
except perhaps for accept or connect ops - or aio etc on
UNIX).  It just makes more sense to me: I usually start an
IO when I know I want to receive or send.  I rarely decide that
since I can send, I'd better create some content to send.
And once I've decided I've got stuff to send, then next
interesting event is 'done or failed'.





Mime
View raw message