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.

Reply via email to