[#BloombergLP-bslstl-StopCallback_NoAlloc]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::StopCallback&lowbar;NoAlloc
:relfileprefix: ../../
:mrdocs:

This component&hyphen;private empty class is used as a dummy &quot;allocator&quot; when `bsl&colon;&colon;stop&lowbar;callback` wraps a non&hyphen;allocator&hyphen;aware type&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;stoptoken&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class StopCallback&lowbar;NoAlloc;
----

== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:bsl/stop_callback-06.adoc[bsl::stop&lowbar;callback]`
| This class holds an object or reference of type `t&lowbar;CALLBACK` and, when constructed using a `stop&lowbar;token` that owns a stop state, schedules the held object or reference to be executed by the thread that requests cancellation on that stop state (if any)&period; However, if cancellation was already requested before the `stop&lowbar;callback` was constructed, the constructor invokes the callback immediately&period; If there is no stop state, or `request&lowbar;stop` is never called for the stop state, then the callback is not invoked&period; `stop&lowbar;callback` stores its callback within its own footprint, and thus never requires memory allocation&semi; however, `stop&lowbar;callback&lt;t&lowbar;CALLBACK&gt;` is an allocator&hyphen;aware class, if `t&lowbar;CALLBACK` is an allocator&hyphen;aware class, and any supplied allocator will then be passed to the constructor of `t&lowbar;CALLBACK`&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
