$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Russell Hind (yg-boost-users_at_[hidden])
Date: 2003-07-10 10:35:28
Ken Alverson wrote:
>
> Is there a discussion somewhere on how to do this and what problems
> (specifically) it can cause? I did a few searches and found lots of talk on
> why it isn't done, but not specifically what happens if you defy it.
>
Well, the discussions tell you why it isn't done, so surely that leads
you onto what will happen if you use a .lib :)
AFAICT, (and this is my basic understanding of the problem) is that
using a DLL is the only way to perform cleanup when a thread exits (as
the only callback is to the DLLEntryPoint to say a thread has finished).
So if you don't run it as a DLL, no clean-up occurs when a thread exits.
We only ever create threads at startup and let them exit at shutdown, so
I'm willing to risk what leaks could occur due to this.
Cheers
Russell