Subj : Re: Formal Mutex Semantics To : comp.programming.threads From : steve Date : Tue Aug 16 2005 10:43 pm In article <871x4t7ecv.fsf@qrnik.zagroda>, Marcin 'Qrczak' Kowalczyk wrote: >Joe Seigh writes: > >> What joke? That's the official Posix position on the issue. > >Should I adapt this as the semantics of synchronization primitives >in my language, or there is a better choice? Release consistency is a well-understood behavior, and is reasonably bug-tolerant -- people aren't likely to be confused by this behavior. Acquire consistency, on the other hand, while easy to implement in a language (you must have lock X to modify data Y), provides the opportunity for numerous ... "interesting" ... program bugs in languages that do not have the lock enforcement. "What? I *did* initialize that data before I put it on the queue!" Also, as pointed out elsewhere (Alexander, I think) you will hold mutexes longer than strictly necessary if you go with acquire consistency. -- Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.8" / 37N 20' 14.9" Internet: steve @ Watt.COM Whois: SW32 Free time? There's no such thing. It just comes in varying prices... .