#5696 closed Bugs (fixed)
win32 detail::set_tss_data does nothing when tss_cleanup_function is NULL
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | Boost 1.52.0 | Component: | thread |
Version: | Boost 1.46.1 | Severity: | Regression |
Keywords: | thread_specific_ptr set_tss_data tss_cleanup_function win32 | Cc: | barney.wrightson@… |
Description
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).
Change History (5)
comment:1 by , 11 years ago
Cc: | added |
---|
comment:2 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 10 years ago
comment:4 by , 10 years ago
Milestone: | To Be Determined → Boost 1.52.0 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Merged to release [80450].
Shouldn't the fix for 2797 fix this issue also?
Committed in trunk [80236].