[#BloombergLP-bslstl-StopCallback_NoAlloc] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::StopCallback_NoAlloc :relfileprefix: ../../ :mrdocs: This component‐private empty class is used as a dummy "allocator" when `bsl::stop_callback` wraps a non‐allocator‐aware type. == Synopsis Declared in `<bslstl_stoptoken.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class StopCallback_NoAlloc; ---- == Friends [cols="1,4"] |=== | Name| Description | `xref:bsl/stop_callback-06.adoc[bsl::stop_callback]` | This class holds an object or reference of type `t_CALLBACK` and, when constructed using a `stop_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). However, if cancellation was already requested before the `stop_callback` was constructed, the constructor invokes the callback immediately. If there is no stop state, or `request_stop` is never called for the stop state, then the callback is not invoked. `stop_callback` stores its callback within its own footprint, and thus never requires memory allocation; however, `stop_callback<t_CALLBACK>` is an allocator‐aware class, if `t_CALLBACK` is an allocator‐aware class, and any supplied allocator will then be passed to the constructor of `t_CALLBACK`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#