Re: [Haskell-cafe] Question about takeMVar

2007-11-29 Thread Bulat Ziganshin
Hello Mauri­cio, Thursday, November 29, 2007, 4:52:54 AM, you wrote: > 'takeMVar' documentation says "if there are consider MVar as one-slot channel with putMVar and takeMVar operations for sending/receiving data -- Best regards, Bulatmailto:[EMAIL PROTECTED]

Re: [Haskell-cafe] Question about takeMVar

2007-11-28 Thread Jules Bean
Maurí­cio wrote: Hi, 'takeMVar' documentation says "if there are multiple threads blocked in takeMVar, and the MVar becomes full, only one thread will be woken up." Since 'takeMVar' is a reading function, i.e., it doesn't change the value of the "variable", why waking up only one thread? If we

Re: [Haskell-cafe] Question about takeMVar

2007-11-28 Thread Matthew Brecknell
> 'takeMVar' documentation says "if there are > multiple threads blocked in takeMVar, and the > MVar becomes full, only one thread will be > woken up." > > Since 'takeMVar' is a reading function, i.e., > it doesn't change the value of the > "variable", why waking up only one thread? If > we wake m

[Haskell-cafe] Question about takeMVar

2007-11-28 Thread Maurí­cio
Hi, 'takeMVar' documentation says "if there are multiple threads blocked in takeMVar, and the MVar becomes full, only one thread will be woken up." Since 'takeMVar' is a reading function, i.e., it doesn't change the value of the "variable", why waking up only one thread? If we wake multiple thre