[#BloombergLP-bslmt-FastPostSemaphoreImpl-take] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/FastPostSemaphoreImpl.adoc[FastPostSemaphoreImpl]::take :relfileprefix: ../../../ :mrdocs: Reduce the count by up to `maximumToTake` and return the amount taken. == Synopsis Declared in `<bslmt_fastpostsemaphoreimpl.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int take(int maximumToTake); ---- == Description If the count of this semaphore is positive, reduce the count by the lesser of the count and the specified `maximumToTake` and return the magnitude of the change to the count. Otherwise, do nothing and return 0. == Return Value amount by which the count was reduced, or 0 if not positive == Parameters [cols="1,4"] |=== | Name| Description | *maximumToTake* | maximum amount by which to reduce the count |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#