pthread_get/getspecific is used to save and retrieve the state of the worker. We can use __thread storage class specifier to do the same which is supported by all the major compilers. Also, __thread is much more efficiently implemented by the compiler.
pthread_get/getspecific is used to save and retrieve the state of the worker. We can use __thread storage class specifier to do the same which is supported by all the major compilers. Also, __thread is much more efficiently implemented by the compiler.