Commit Graph

5 Commits (b3bde09b8a6a190cd7bae348ce277bae77150389)

Author SHA1 Message Date
Wenzel Jakob 58c61d2959 put back some comments 2013-01-27 18:02:22 -05:00
Edgar Velazquez-Armendariz 4f9315ae1a Fix to the TLS fix - deletes the local TLS data in the reverse order of creation
The previous fix also had a conceptual error: it allowed the per-thread map to
be modified concurrently, as the behavior of map::find/map::operator[] is to
insert a new element with that key if it is not found.

Also this new fix uses a recursive mutex (also available in C++11) as the same
thread will aquire the lock during conditions such as destruction, e.g. a TLS
entry querying the current thread for logging as part of its destructor.
2013-01-26 23:08:11 -05:00
Edgar Velazquez-Armendariz 8e372a61b7 Fix a deadlock and improve query performance in TLS.
While cleaning up TLS resources, some destructors might still query for the
thread which is currently being shut down; logging is a very common case.
This patch causes the TLS implementation to use the lock only when the data
has not been created yet, improving performance and fixing that deadlock.
2013-01-24 14:31:55 -05:00
Wenzel Jakob efe33e9212 OCD: remove trailing spaces from all files 2012-10-20 14:04:13 -04:00
Wenzel Jakob 35da602d4e The epic 0.4.0 merge of the bidirectional branch -- sorry not to do this in smaller batches, but doing so would have been an incredible amount of work. A through description of the changes will be made available on the blog this week. 2012-09-27 12:43:51 -04:00