RE: [boost] Re: Windows MSVC thread exit handler for staticly linkedBoost.Threadn

-----Original Message----- From: Aaron W. LaFramboise [mailto:aaronrabiddog51@aaronwl.com] Sent: Tuesday, August 03, 2004 4:20 AM To: boost@lists.boost.org 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.
participants (1)
-
Richard_Cox@Dell.com