[#BloombergLP-bslmt-ThreadUtil-getSpecific] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThreadUtil.adoc[ThreadUtil]::getSpecific :relfileprefix: ../../../ :mrdocs: Return the calling thread's value associated with the specified key. == Synopsis Declared in `<bslmt_threadutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void* getSpecific(xref:BloombergLP/bslmt/ThreadUtil/Key.adoc[Key] const& key); ---- == Description Return the thread‐local value associated with the specified `key`. A `key` is shared among all threads and the value associated with `key` for each thread is 0 until it is set by that thread using `setSpecific`. The behavior is undefined unless this method is called outside any thread key cleanup function associated with any key by `createKey`, `key` was obtained from a successful call to `createKey`, and `key` has not been deleted. == Return Value thread‐local value associated with `key` for the calling thread == Parameters [cols="1,4"] |=== | Name| Description | *key* | process‐wide thread‐local key to query |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#