From: David Deakins (ddeakins_at_[hidden])
Date: 2007-11-15 15:31:06
Roland Schwarz wrote:
> David Deakins wrote:
>> Incidentally, while looking through this, I had a question about
>> of the test files declare BOOST_THREAD_TEST. So I'm not sure when this
>> function definition would actually come into play.
> This file is currently used in the test suite. It allows for static
> linking even if automatic cleanup is not available. BUT: the tests are
> taking care of this, i.e they test for cleanup working or not.
Should the thread/test/Jamfile.v2 declare BOOST_THREAD_TEST then? That
would allow the thread regression tests to link correctly for the WinCE
regression tests. Then the results of the test would reflect whether
cleanup is happening correctly, right?
Incidentally, while I was studying the implementation of the cleanup
code, I think I ran across a bug in win32/thread.cpp.
detail::add_thread_exit_function uses get_current_thread_data() but does
not verify whether or not the returned pointer is NULL. If the thread
was not created with the boost api, get_current_thread_data() will
indeed return a NULL (if I understand correctly) and
make_external_thread_data() needs to be called. This is how
set_tss_data handles things. Am a correct that add_thread_exit_function
is missing this externally-generated thread code?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk