Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
singleton with multithreading
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="ank, post: 2511588"] Hi, I have some question about Singleton Pattern in C++. I think I understand that static initialization order across translation unit is unspecified by the standard, but what can I do to ensure that some kind of static mutex is automatically initialized before the first use of it? I cannot assume that this mutex is used only after executing main() function because I need to use this mutex to lock singleton inside initialization code and may apply double-check pattern. Currently, I have very little experience with multithread programming. I am not a native English speaker so my message may not be well written. Thanks in advance for any suggestions. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
singleton with multithreading
Top