[#BloombergLP-bslmt-ThreadUtilImpl-04-createKey] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThreadUtilImpl-04.adoc[ThreadUtilImpl<Platform::PosixThreads>]::createKey :relfileprefix: ../../../ :mrdocs: 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. == Synopsis Declared in `<bslmt_threadutilimpl_pthread.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int createKey( xref:BloombergLP/bslmt/ThreadUtilImpl-04/Key.adoc[Key]* key, xref:BloombergLP/bslmt_KeyDestructorFunction.adoc[bslmt_KeyDestructorFunction] destructor); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#