As I can see at: http://gcc.gnu.org/projects/cxx0x.html thread_local keyword is unfortunately unsupported in gcc yet.
Are there any alternatives for that? I don't want to use boost library.
The gcc compiler has a storage class __thread
that might be close enough.
http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Thread-Local.html
According to this GCC documentation page, you should try to use __thread
as a qualifier (like volatile
or const
are) for your thread local storage.
GCC 4.8.0 includes support for the thread_local
storage class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With