Nonblocking IO (was: Binary IO)

Simon Marlow simonmar at microsoft.com
Mon Apr 25 07:15:47 EDT 2005


On 25 April 2005 10:51, Peter Simons wrote:

> Simon Marlow writes:
> 
>  >> hPutBufNonBlocking :: Handle -> Ptr a -> Int -> IO Int
>  >> hGetBufNonBlocking :: Handle -> Ptr a -> Int -> IO Int
> 
>  > I believe they don't have proper non-blocking behaviour
>  > on Windows, though.
> 
> What exactly would happen when I'd try to use those on
> Windows? Would they block until they had read/written
> exactly 'Int' bytes? Or is there some other, more subtle
> difference?

I think they behave like the blocking variants on Windows (but the code
is quite intricate.. I'm not 100% sure).  This should really be fixed.

Cheers,
	Simon


More information about the Libraries mailing list