Create a process-wide key for thread-local storage.
Declared in <bslmt_threadutilimpl_pthread.h>
static
int
createKey(
Key* key,
bslmt_KeyDestructorFunction destructor);
Load, into the specified key, an identifier that can be used to store (setSpecific) and retrieve (getSpecific) a single thread-specific pointer value. Associate with the identifier, the specified destructor if a non-zero value is specified. Return 0 on success, and a non-zero value otherwise.
0 on success, and a non-zero value otherwise
| Name | Description |
|---|---|
| key | receives the new process-wide thread-local key |
| destructor | optional destructor for key values |