Re: [Cppcms-users] Getting ready to 1.0.5
Brought to you by:
artyom-beilis
|
From: Joerg S. <jo...@br...> - 2014-10-26 20:02:49
|
On Sun, Oct 26, 2014 at 01:25:45PM +0000, Artyom Beilis wrote: > BUT... I discovered a huge issue with TLS implementation > in the pthreads library that requires workaround. > > If you run pthread_key_create more than 255 times > (even if you call pthread_key_delete and release the keys) > the key creation. > 256 is the total number of TLS keys allowed at NetBSD. > > > However pthread_key_delete does not "free" the spot - it > caused all ICU tests that use TLS for optimization > fail and it may cause other problems that aren't > visible right now. That one has been addressed after NetBSD 6 has been branches. The core of the issue is that pthread_key_destroy was added as an afterthought with some non-trivial implications for how it behaves on existing threads. Please avoid the term TLS when talking about pthread_key -- it is normally used for __thread and the related C++11 feature. Joerg |