George Russell wrote: > Exactly the same happens at the same time to Processor 2. > Now somehow you have to distinguish between Processor 1 and Processor 2, > because only one is going to get to lower the flags. But I don't think > with the existing Concurrency extensions plus standard Haskell you can. I take that back. There's a fundamental error in this analysis. Concurrent Haskell allows you to get the ThreadId of the current thread, and ThreadId DOES implement Ord. I thought of this last night and tried to work out a way of making the thread with the least ThreadId win, but couldn't quite do it. But it may still be possible.
- Re: Trivial Haskell Concurrency problem Michael Hobbs
- Re: Trivial Haskell Concurrency problem Michael Hobbs
- Re: Trivial Haskell Concurrency problem 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
- Re: Trivial Haskell Concurrency problem George Russell
- Re: Trivial Haskell Concurrency problem Tom Pledger
- Re: Trivial Haskell Concurrency problem Marcin 'Qrczak' Kowalczyk
- Re: Trivial Haskell Concurrency problem George Russell
- Re: Trivial Haskell Concurrency problem George Russell
- Re: Trivial Haskell Concurrency problem Tom Pledger
- Re: Trivial Haskell Concurrency problem Marcin 'Qrczak' Kowalczyk