[project @ 2003-02-21 05:34:12 by sof]
authorsof <unknown>
Fri, 21 Feb 2003 05:34:13 +0000 (05:34 +0000)
committersof <unknown>
Fri, 21 Feb 2003 05:34:13 +0000 (05:34 +0000)
commit967f7424d2713bbe35d2480d3f621f74305e539d
tree09244658753abccb12cc023065d0a0d79058161d
parentca19b378d4dfc9f3551b3f6d6a755609c1bc366b
[project @ 2003-02-21 05:34:12 by sof]
Asynchronous / non-blocking I/O for Win32 platforms.

This commit introduces a Concurrent Haskell friendly view of I/O on
Win32 platforms. Through the use of a pool of worker Win32 threads, CH
threads may issue asynchronous I/O requests without blocking the
progress of other CH threads. The issuing CH thread is blocked until
the request has been serviced though.

GHC.Conc exports the primops that take care of issuing the
asynchronous I/O requests, which the IO implementation now takes
advantage of. By default, all Handles are non-blocking/asynchronous,
but should performance become an issue, having a per-Handle flag for
turning off non-blocking could easily be imagined&introduced.

[Incidentally, this thread pool-based implementation could easily be
extended to also allow Haskell code to delegate the execution of
arbitrary pieces of (potentially blocking) external code to another OS
thread. Given how relatively gnarly the locking story has turned out
to be with the 'threaded' RTS, that may not be such a bad idea.]
Data/Array/IO.hs
GHC/Conc.lhs
GHC/Handle.hs
GHC/IO.hs