Subj : Re: Can C++ local static objects be made thread safe? To : comp.programming.threads From : gniccolai Date : Sun Feb 20 2005 12:19 pm > > David, I didn't mean HOW I may access the variable. I meant WHEN. I > > din't say that access must not be guarded somehow (i.e. BY MYSELF), I > > wrote that I may try the access at ANY MOMENT. > > I've restored the context of Marcin's article that you were replying to. > It is clear from the quoted section of POSIX that your response to that > article was wrong: there *are* restrictions on when memory locations may > be accessed. (There are additional restrictions in the C++ standard.) Show me where. I can't find any specific limitation about WHEN I am told to access a variable. Unless you say "when you secure it..." or "when it's safe"; but IMHO that is bound to HOW, not to WHEN. Then, show me: 1) Where it is said that there are precise moments in time in which accessing shared variables is not to be done. I really can't find it. 2) Which those moments are. > > > P.s. BTW, you didn't cite the part of the article that says: > > > > ---- > > Applications may allow more than one thread of control to read a > > memory location simultaneously. > > Because it's not relevant. To me, it seems relevant. It says that simultaneusly (i.e. in any moment), threads can access (in reading) the same memory without breaking the standard. Bests, Gian. .