Subj : Re: double-checked locking in C To : comp.programming.threads From : Chris Friesen Date : Tue Jul 05 2005 07:06 pm amorox@gmail.com wrote: > Hi, > > I would like to use the DCL idiom (double-checked locking) to guarantee > the once and only once execution of an initialization code: > Is there any problem using this idiom in a multithread C program? If > affirmative would you explained why? Please check the archives. There have been many discussions on this topic. If you read global variables without using locking, you can run into all kinds of synchronization issues. Most of them will only show up on certain architectures or systems, which makes them really difficult to track down. Chris .