OTOH, certainly doing an IO operation should cause a thread switch.
In my limited use of the concurrency extension, I found it hard to
write a dining philosophers program that behaved randomly. I had to
throw yield's in all over the place. The `GHC-specific concurrency
issues' of the
OTOH, certainly doing an IO operation should cause a thread switch.
In my limited use of the concurrency extension, I found it hard to
write a dining philosophers program that behaved randomly. I had to
throw yield's in all over the place. The `GHC-specific concurrency
issues' of the hslibs
Hello!
When running this program under GHC 4.08 (OpenBSD 2.7, x86),
only "b"s are written. Shouldn't GHC's implementation of
Concurrent Haskell be preemptive?
Regards,
Hannah.
import Concurrent
main = forkIO a b
where
a = putStrLn "a" a
b = putStrLn "b" b