RAII registration returned by CancelToken::register_callback. More...
#include <cancel.hpp>
Public Member Functions | |
| CancelRegistration () noexcept=default | |
| ~CancelRegistration () | |
| CancelRegistration (const CancelRegistration &)=delete | |
| CancelRegistration & | operator= (const CancelRegistration &)=delete |
| CancelRegistration (CancelRegistration &&other) noexcept | |
| CancelRegistration & | operator= (CancelRegistration &&other) noexcept |
| operator bool () const noexcept | |
| True while the callback is still registered and has not yet been run. | |
| void | reset () noexcept |
| Unregister now. Idempotent. | |
Friends | |
| class | CancelToken |
RAII registration returned by CancelToken::register_callback.
Destroying (or reset()-ing) a registration guarantees the callback is not running and will not run afterwards: if another thread is mid-callback, the destructor waits for it to return. A registration destroyed from inside its own callback does not wait.
|
defaultnoexcept |
| pulp::runtime::CancelRegistration::~CancelRegistration | ( | ) |
|
delete |
|
noexcept |
|
inlineexplicitnodiscardnoexcept |
True while the callback is still registered and has not yet been run.
|
noexcept |
|
delete |
|
noexcept |
Unregister now. Idempotent.
|
friend |