[Boost-bugs] [Boost C++ Libraries] #5696: win32 detail::set_tss_data does nothing when tss_cleanup_function is NULL

Subject: [Boost-bugs] [Boost C++ Libraries] #5696: win32 detail::set_tss_data does nothing when tss_cleanup_function is NULL
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-07-14 03:55:15


#5696: win32 detail::set_tss_data does nothing when tss_cleanup_function is NULL
-------------------------------------------------------------------------+--
 Reporter: barney.wrightson@… | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.46.1 | Severity: Regression
 Keywords: thread_specific_ptr set_tss_data tss_cleanup_function win32 |
-------------------------------------------------------------------------+--
 Due to changes made in addressing Ticket #4736 when using a
 thread_specific_ptr that has been constructed with a NULL
 tss_cleanup_function, reset() will not set the data to anything.
 Previously this would work fine, with no cleanup function being called.

 Looking at the documentation, behaviour is not specifically defined when
 the cleanup function is NULL, but the previous behaviour was consistent
 with how the pthreads implementation works, as well as being logical.

 to fix line 597 of libs\thread\src\win32\thread.cpp should change
 from:

 else if(func && tss_data)

 to:

 else

 I don't think this was necessary to fix the original bug, but I haven't
 tested this. As there was another patch applied after the one that added
 this change, as the first patch caused other breakages maybe it was meant
 to have been reverted anyway (but wasn't).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5696>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC