Boost logo

Boost :

From: Richard_Cox_at_[hidden]
Date: 2004-08-04 03:42:52


> -----Original Message-----
> From: Aaron W. LaFramboise [mailto:aaronrabiddog51_at_[hidden]]
> Sent: Tuesday, August 03, 2004 4:20 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] Re: Windows MSVC thread exit handler for
> staticly linkedBoost.Threadn

> The only concern I have--I don't know how important this is--is that
> when a thread is killed with TerminateThread, I think neither TLS
> callbacks nor DllMain()s will be called. This would cause
> the TLS count
> to never reach zero, and for TlsFree to never be called.
>
> These threads might not even be associated with the Boost TSS at all.
> For example, another third party library in some DLL might be using
> TerminateThread, and the application programmer may not even
> know about
> this, so it may be suprising to him when the reference count never
> reaches zero for apparently no good reason.
>

I don't think cleanup after a TerminateThread would make any sense.
TerminateThread does
zero cleanup to start with (e.g. the threads is not freed). It would be
inconsistent if any TLS cleanup was done in this case).

Richard
All opinions are mine and do not represent in any way the position of
Dell Corporation.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk