On 21/08/10 18:58, John Millikin wrote: > I think the docs are wrong, or perhaps we're misunderstanding them. > Magnus is correct. > > Attached is a test program which listens on two ports, 42000 (blocking > IO) and 42001 (non-blocking). You can use netcat, telnet, etc, to send > it data. The behavior is as Magnus describes: bytes from > hGetNonBlocking are available immediately, while hGet waits for a full > buffer (or EOF) before returning. > > This behavior obviously makes hGet unsuitable for enumHandle; my > apologies for not understanding the problem sooner.
Thanks, but I suspect that it was my bad description of the issue that made understanding the issue more problematic. Anyway it's good we now understand each other, and even better that we agree :-) As an aside, has anyone written the code necessary to convert a parser, such as e.g. attoparsec, into an enumerator-iteratee[1]? /M [1] Similar to how attoparsec-iteratee does it for iteratee-iteratee. -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe