At Thu 04 Sep 2008 13:50:20 BST, Rudi Lindl <rudi.lindl@web.de> wrote:[snip code]
I have trouble with a clean up function within a dll.
I'm going to make a stab in the dark and guess that you're linking statically against Boost.Thread from both the main app and the DLL? If so, then this is the reason: the DLL cannot hook the TLS cleanup into the boost::thread data structure from the main app, so the cleanup isn't called.
But the cleanup funtion is not called. Any Idea?
If i move the myDllFuntion, void detach_thread funtion and the declaration
of the boost::thread_specific_ptr<unsigned int>
current_thread_index(&detach_thread) from the dll to the file where the main
funtions is defined everything works as expected.
If you *are* using the DLL version of Boost.Thread, then I'll have to investigate further.
Anthony
--
Anthony Williams | Just Software Solutions Ltd
Custom Software Development | http://www.justsoftwaresolutions.co.uk
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL
_______________________________________________
threads-devel mailing list
threads-devel@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/threads-devel