Boost logo

Boost :

From: William E. Kempf (wekempf_at_[hidden])
Date: 2003-03-26 09:46:32

Russell Hind said:
> I'd been wondering this, and heard about TLS issues. The issues are
> only on Windows it appears. Search for the thread
> "Fwd: Thread-Local Storage (TLS) and templates" by Greg Colvin on
> 18/02/2003
> Specifically, the many posts by William Kempf and Edward Diener discuss
> the problems on windows with TLS cleanup.
> I do have a question on this issue: If this problem is only to do with
> TLS cleanup when a thread exits, then if all threads are created when
> the program starts and only destroyed when the program exited, then, in
> practice, could this really be an issue? I.e. if we only work like
> this, could building thread as a static lib cause problems providing
> that we don't let threads exit in the middle of the program? We're
> currently really trying to stay clear of any DLLs.

Theoretically at least, I don't see why this would cause a problem. You
intentionally leak, but the leak is benign since it occurs only right
before the application exits. But most users won't code this way, nor do
I want to have to deal with the support requests/questions this would
cause. So, unless you have some suggestion as to how I can enable this
usage with out causing confusion, I'm not sure I'd care to re-enable
static builds. But you could probably fairly easily hack things to build
that way yourself.

William E. Kempf

Boost list run by bdawes at, gregod at, cpdaniel at, john at