| elegant. If MVar's were instances of Ord as well as Eq, a | neat solution would | be to always get the least MVar first, but they aren't. So | what should one do? But you could make Flag an instance of Ord data Flag = MkFlag Int (MVar Bool) Now newMVar needs to consult a global variable to get the next Flag number, but after that there's no global locking. This is, of course, precisely what we'd have to do to make MVars an instance of Ord --- but it would impose a cost on all MVars, whether or not they needed it, which is why we've not done it. Simon
- Trivial Haskell Concurrency problem George Russell
- Re: Trivial Haskell Concurrency problem Michael Hobbs
- Trivial Haskell Concurrency problem Tom Pledger
- Trivial Haskell Concurrency problem Tom Pledger
- Re: Trivial Haskell Concurrency problem Michael Hobbs
- Re: Trivial Haskell Concurrency problem Michael Hobbs
- Re: Trivial Haskell Concurrency problem Michael Hobbs
- Re: Trivial Haskell Concurrency pro... George Russell
- Re: Trivial Haskell Concurrency problem Simon Peyton-Jones
- Re: Trivial Haskell Concurrency problem George Russell
- Re: Trivial Haskell Concurrency problem Wolfram Kahl
- Re: Trivial Haskell Concurrency problem Marcin 'Qrczak' Kowalczyk
- Re: Trivial Haskell Concurrency problem George Russell
- RE: Trivial Haskell Concurrency problem Simon Peyton-Jones
- Re: Trivial Haskell Concurrency problem Wolfram Kahl
- Re: Trivial Haskell Concurrency problem George Russell
- Re: Trivial Haskell Concurrency problem George Russell
- Re: Trivial Haskell Concurrency problem Michael Hobbs
- Re: Trivial Haskell Concurrency problem Marcin 'Qrczak' Kowalczyk