Boost logo

Boost Users :

From: William E. Kempf (wekempf_at_[hidden])
Date: 2002-12-18 10:41:11


Martin Johnson said:
>
> Hi,
>
> This has probably been asked before. I cant find doco giving detail. So
> excuse me if this is old topic.

I answered this in private e-mail first. You just needed to wait to be
verified by the list admins for this post to come through to the group.
I'll supply the answer again here, so that it is available to the public
at large.

BTW, this is a FAQ.

> I am involved with GPL project that uses boost::threads.
>
> I have a problem understanding implementation and what threadmon.dll is
> for. I see that the code is attempting to manage tss stuff.

Yes, it's used to call cleanup handlers for thread_specific_ptr<>.

> How is the tss stuff managed when lib is a static link under win32?

The threadmon.dll is a seperate library that's always dynamically linked.

> Is it correct that if I wish to static link that I need this other
> threadmon.dll as well.

Yes.

> Has it been suggested that structured exceptions can perform the same
> function on win32 with a finally() handler from within thread_proxy?
> This is a gurantee of invocation. The cleanup attempt could though win32
> doco states cleanup is guranteed, though couldnt a lib global could
> easily handle main thread cleanup?

This will only work for threads created by the Boost.Threads library. It
won't work for "adopted" threads (thread created outside of Boost.Threads
that must be made to work with the Boost.Threads library). This is
especially important for TSS since you might use Boost.Threads in a
library that's in turn used by someone who's never even heard of
Boost.Threads but has made extensive use of the "native" threading
libraries.

William E. Kempf


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