-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 8/26/10 05:13 , Vo Minh Thu wrote: > Is is possible to get Network.Socket.ByteString.recv to be > non-blocking (i.e. return directly even if no data is available) ?
"What are you really trying to do?" The Haskelly solution to this is to use threads; let the thread reading the socket block and the main thread synchronize with it somehow. (Haskell threads are very inexpensive; don't be afraid of them.) - -- brandon s. allbery [linux,solaris,freebsd,perl] [email protected] system administrator [openafs,heimdal,too many hats] [email protected] electrical and computer engineering, carnegie mellon university KF8NH -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkx2mn4ACgkQIn7hlCsL25U2fQCgjHzzO3f61z7GeyVZfJIaet7k vE4An1CaiqTke6BdpuvYsg5U0d+n3Ig7 =QcGa -----END PGP SIGNATURE----- _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
