Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : Alexander Terekhov Date : Wed Jan 19 2005 10:04 am Gianni Mariani wrote: [...] > I don't think so. Having heard the growlings of a colleague recently, I > suspect there are at least 2 people that violently disagree with you. > > Do explain what you think is so silly. "You should not pay for what you don't use" motto, you know. For mutable static locals, you must synchronize operations (I mean apart from init) anyway. So, apart from mutable static locals atomic<>"-ized internally, you better simply stick to some lock (e.g. POSIX's statically initialized mutex or rwlock) for both init and subsequent operations on "threads unaware" static local. That's just one example where compiler synchronized static local is totally useless. http://groups.google.de/groups?selm=3DA591E2.6B63D463%40web.de http://groups.google.de/groups?selm=40A4CA09.89A88D45%40web.de regards, alexander. .