Subj : Re: Avoiding synchronization (pthreads) To : comp.programming.threads From : David Schwartz Date : Wed Mar 02 2005 12:30 pm "Marcin 'Qrczak' Kowalczyk" wrote in message news:871xayt8lr.fsf@qrnik.zagroda... > If a global variable of type int is read without holding a mutex, at > the same time as other threads may write into it (holding the mutex), > can anything worse than getting an out-of-date value happen in practice? Oh for the love of god, just lock it properly. Come back when you have performance data to demonstrate that this is an issue. If half as much effort as is put into avoiding locks were put into using them properly, the average quality of multi-threaded code would go *way* up. DS .