[#BloombergLP-bslmt-FastPostSemaphoreImpl-getDisabledState] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/FastPostSemaphoreImpl.adoc[FastPostSemaphoreImpl]::getDisabledState :relfileprefix: ../../../ :mrdocs: Return an odd value if this semaphore is wait disabled, and an even value otherwise. The returned value can be used to detect a rapid short sequence of `disable` and `enable` invocations by comparing the value returned by `getDisabledState` before and after the sequence. For example, for any initial state of a semphore instance `obj`: ` int state = obj.getDisabledState(); obj.disable(); obj.enable(); ASSERT(state != obj.getDisabledState()); ` This functionality is useful in higher‐level components to determine if this semaphore was disabled during an operation. == Synopsis Declared in `<bslmt_fastpostsemaphoreimpl.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int getDisabledState() const; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#