This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13487] Construction of local static objects is not thread-safe


------- Additional Comments From rmerkert at alphatech dot com  2004-07-05 03:09 -------
I'm glad this PR has been re-opened. This particular issue has really been
bugging me - I ended up writing a couple of macros to deal with this.  

One thing to be careful about is the possibility of a thread deadlock in case
there is a cycle. It is probably best to use a recursive mutex, because it will
ensure that the program's behavior is that of a single-threaded application.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13487


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]