[#BloombergLP-bslmt-ThreadUtil-setSpecific] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThreadUtil.adoc[ThreadUtil]::setSpecific :relfileprefix: ../../../ :mrdocs: Associate the specified thread‐local `value` with the specified process‐wide `key`. Return 0 on success, and a non‐zero value otherwise. The value associated with a thread for a given key is 0 until it has been 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. == Synopsis Declared in `<bslmt_threadutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int setSpecific( xref:BloombergLP/bslmt/ThreadUtil/Key.adoc[Key] const& key, void const* value); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#