Hi.
I would like to share some idea about async I/O support in Go.
Historically, UNIX systems have implemented support for multiplexed I/O with polling.
Polling is the more natural (IMHO) method in network programming, but it is no good for
disk I/O.
Windows only supports async I/O, for everything including sockets.
In UNIX, async I/O is supported by a new POSIX aio API, and some operating systems like
FreeBSD have async I/O support in the poller.
Since Go offers a portable API for network programming and a simple portable API for files,
a possible solution to implement async I/O in Go is to implement a separate, portable, API
in io/async and/or os/async package.
This API should support async I/O for every files like objects, as it is done on Windows,
probably excluding sockets.
As an unrelated example, ACE provides both a Reactor and a Proactor:
Go will have both the net package, with a reactor pattern implementation,
and an async package with a proactor pattern implementation.
Internally, both packages will use an internal. different, poller, when supported by
the operating system.
Comments?
Thanks Manlio Perillo