
Well put !!! I have in fact implemented the aio interface in terms of windows API calls. Aside from the fact that the windows API in this area is a little "inelegant" it actually mapped quite well to the aio interface. When I was faced with the problem of adding async i/o to my application, and not wanting to make my application windows specific, I came upon aio.h. I implemented it in terms of windows API calls and got things working to my satisfaction. Afterwards, I believe I built and tested my app on a *nix system with aio. If I recall correctly, it worked as I hoped it would. To this day I have no idea how aio was implemented on a freeBSD machine. I doubt it added threads to my ap - though I can't say for sure. It might have relied on some lower level os API or it might have had native support at the OS level. So - it seems that if wants to use aio.h - its already there for atleast some *nix systems. If one want's to make it universal it can be implemented for Win32 systems. For other *nix systems it could be implemented in terms of threads. Robert Ramey Jonathan Wakely wrote:
On Tue, Mar 29, 2005 at 04:36:42PM +0300, Boris wrote:
Robert Ramey wrote:
Windows has the concept of "Overlapped I/O" which permits dispatch of an i/o request that invokes a call back when done.
Posix has aio which functions (I believe) in a similar way.
So one has the concept of asyncronous i/o without any explicit reference to threads at least at the application level.
I am not sure if I understand correctly. Just as Don I think we can't get around threads when we have callbacks. I don't know about Windows but the callback in aio (Posix) is done by creating a new thread.
How the kernel chooses to implement the aio system calls is an implementation detail - it certainly doesn't require use of Boost.Thread types! I think what Robert was saying is that an application can use POSIX aio without ever having to use or know about POSIX threads.
You and Don seem to be requiring that the application explicitly create and manage threads. Several people have suggested they'd like to use some form of AIO without having to use threads.
jon
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost