On 9/19/06, Robert Ramey <ramey@rrsd.com> wrote:
I'm wouldn't want anyone using Boost Serialization to have to bring threading into his program just for this.
 
I'm convinced that here is a fix which makes the code multi_thread safe without this.
 
Robert Ramey

Well I'm not following the particular case well enough, but I'm pretty sure in the general case, there is no fix without using some sort of threading library.

However, for most systems, you CAN assume that all global inits are done before main AND before additional threads are created.  So in those cases a mixture of static-local and startup-init-dummy works.  For the other systems, well, you just have a caveat that you can't use serialization during static-init with multiple threads, without some user intervention.  If the user is doing threads during static init, then can probably handle the problems that result.

you might want to check out the 'Threadsafe Singleton' thread in comp.programming.threads:

http://groups.google.com/group/comp.programming.threads/browse_frm/thread/fb87ab5c130c6331/a7f96b49cb4d2ce5?lnk=raot

Tony