readChan and unGetChan?

Li, Peng ringer9cs+ghc at gmail.com
Mon Apr 3 10:29:36 EDT 2006


Suppose the following happens:

(1) Thread A calls readChan on an empty channel and waits
(2) Thread B puts something to the read-end of the channel using unGetChan

When a GHC program does this, both threads are blocked! Is it the
behaviour we really want for unGetChan, or should we fix the
implementation for Control.Concurrent.Chan?

Thanks,
Peng


More information about the Glasgow-haskell-users mailing list