This class is a mechanism for making and observing cancellation requests. An object of this class may have (possibly shared) ownership of a stop state, in which case it can be used to make a cancellation request or observe whether a cancellation request has been made on the owned stop state; it is also possible for a stop_source object to not own a stop state. Due to its shared ownership semantics, it is safe to pass a copy of a stop_source object to a callback that might outlive the original stop_source object; however, a callback that should only be able to observe a cancellation request, without being able to request cancellation itself, should instead be passed a stop_token, which can be created by calling stop_source::get_token.
Synopsis
Declared in <bslstl_stoptoken.h>
class stop_source;
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this object. |
Assignment operators |
|
Return a |
|
If |
|
Return |
|
Return |
|
Set |
Friends
Name |
Description |
Set |
|
Return |
Created with MrDocs