Re: Silly question about IORefs and MVars

2002-11-23 Thread Alastair Reid
Nicolas Oury <[EMAIL PROTECTED]> writes: > I wonder why IORefs updates aren't safe : it seems that preemptive > scheduling takes place during memory allocation and I can't see > where there could be an allocation (and so a switch) in a read or a > write of an IORef. Here's a typical code sequence

RE: Silly question about IORefs and MVars

2002-11-18 Thread Simon Marlow
> I have a silly question about IORefs and MVars. > > When do we have to use MVars if a var is accessed by multiple > threads. > In fact, I wonder why IORefs updates aren't safe : > it seems that preemptive scheduling takes place during memory > allocation > and

Silly question about IORefs and MVars

2002-11-17 Thread Nicolas Oury
Hello, I have a silly question about IORefs and MVars. When do we have to use MVars if a var is accessed by multiple threads. In fact, I wonder why IORefs updates aren't safe : it seems that preemptive scheduling takes place during memory allocation and I can't see where there c