In message <[EMAIL PROTECTED]
rosoft.com>, "Simon Marlow" writes:
>One common case (perhaps the only common case) where this happens is
>hGetContents.  The lazy stream returned by hGetContents will not behave
>in a non-blocking way in a cooperative implementation.  I can't decide
>which demon to blame here: lazy I/O or cooperative concurrency :-)

Maybe the problem is in combining these demons :-). I mean, maybe the
problem is passing an unevaluated thunk containing references to
resources of one execution context into another (co-operative)
thread. deepSeq'ing the thunk (to force the side effects to take
place) in the correct context before allowing access by the other
thread should help, I think [but you lose ability to pass functions
from one thread to another, which might be worse].
-- 
  Esa Pulkkinen
_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://haskell.org/mailman/listinfo/haskell-prime

Reply via email to