Rebel Fork Framework
Urho3D::StopToken Class Reference

#include <Urho3D/Core/StopToken.h>

Public Member Functions

 StopToken ()
 Construct default.
 
void Stop ()
 Signal stop.
 
bool IsStopped () const
 Check whether is stopped.
 

Private Attributes

ea::shared_ptr< std::atomic< bool > > stopped_
 Whether the token is stopped.
 

Detailed Description

Stop token used to thread-safely stop asynchronous task. This object can be passed by value and all copies will share same internal state.. TODO: For better memory management split this class into StopSource with shared_ptr and StopToken with weak_ptr, or reuse corresponding classes from C++20 standard library.


The documentation for this class was generated from the following file: