Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-09-28 09:05:47


I will add some more information to the documenation concerning DLLS and
threading.

This will be a summary of the anecdotal information that has trickled in on
an occasional basis.

In addition.

a) I've made changes which I hope will force initialization and construction
of all global
registry tables to occur at pre-main time. I'm hoping that this will make
archives thread-safe
as they are meant to be.

b) I've made incremental changes to support serialization code in DLLS. It
turns out to
be difficult and a lot of work to set a good test for this. The problem is
that when a DLL
is dynamically loaded, the global/static variables defined in that DLL are
constructed/initialized.
When they DLL is unloaded, these have to be destroyed and removed from the
tables. Its
not clear to me when DLLS are loaded - probably when needed - which suggests
that its
possible that the global/static tables could be altered after pre-main
time - which in turn
could create problems is there are parallel threads using archives.

Just a little taste of what's involved.

Robert Ramey

Anyway, is there any documentation on how to use boost::serialization
library correctly across multiple DLLs & explain what it is doing during
initialization/destruction time?

**** Are you using DLLS as well?

Not yet, but plan to use DLL soon.
Though my workaround works so far, I'm still not 100% sure what the root
cause is for the SIGSEGV fault (Any explanation?).

*** can you trap this in the debugger and send the stack trace?

This makes me nervous in DLL'ize my code w.r.t. serialization. It'd be
great there's clear guidelines on what to do/not to do with DLL (or global
static, in general) for user of boost::serialization.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net