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: [RFC] apr_pollcb api?
Date Mon, 10 Apr 2006 20:16:36 GMT
>I think you wrong when say "This sort of reactive design doesn't fit
>well in Win32. Win32 is 'completion' based "

>WinAPI contains also Callback based (in windows terminology - completion
>routine) and event based asynchronous methods of IO.

No - sorry if I didn't explain well enough.

I mean that Win32 generally informs you that a requested operation has
completed (or failed).  select and poll inform you that you might
profitably request an operation - there's no guarantee that there is
still any buffer space or data to receive.

POSIX aio is more like the Win32 approach.

Its easy to build an emulation of the Win32 semantics on top of a reactor,
but not the other way around.  Win32 is essentially AIO and completions
whichever of its methods (async IO methods, overlapped, completion ports
etc) that you use, with the exception of its rather brain-dead select
implementation, which is there to help porting to Windows, but not for
building high-performance Windows software.

James




Mime
View raw message