Changes between Initial Version and Version 1 of Ticket #3837, comment 7


Ignore:
Timestamp:
Aug 19, 2012, 3:19:36 PM (10 years ago)
Author:
viboes

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3837, comment 7

    initial v1  
    1 Hi I don't understand the purpose of your test. You are constructing twice an object on the same address. What is the interest of such a test?
     1If I understand correctly, you are expecting that the destructor of the thread_specific_ptr must reset the thread specific pointer for all the threads that are using this key.
     2
     3IMO, the user must ensure that the thread_specific_pointer instance outlives all the threads that are using it. Otherwise, the library needs to maintain a list of all the threads that are using a specific key, which goes against the purpose of tss to reduce the contention between threads by accessing a thread specific and not a global data.
     4
     5The documentation must state clearly this constraint (design principle).
     6Note that pthread works already in this way.