Re: [Cppcms-users] Getting ready to 1.0.5
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@ya...> - 2014-10-27 08:03:17
|
> >> 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. Destructors are not called if data still exists, use of the key afterwards leads to undefined behavior. It is very well defined practically defining the implementation. http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_key_delete.html All implementation I'm aware of follow this spec. > Please avoid the term TLS when talking about pthread_key -- it > is normally used for __thread and the related C++11 feature. > AFAIK Thread local storage is still called TLS regardless implementaion: using API like POSIX pthread_key_create or WinAPI TlsAlloc or using language based features. > Joerg > In any case it implies some limits on use of CppCMS in NetBSD other than that I don't see any other problems. I commited latest fixes so you are welcome to take a look on them. > ------------------------------------------------------------------------------ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |