![]() |
Bitcoin Core 30.99.0
P2P Digital Currency
|
Helper class that detects when a promise is canceled. More...
#include <util.h>
Public Member Functions | |
| ~CancelMonitor () | |
| void | promiseDestroyed (CancelProbe &probe) |
Public Attributes | |
| bool | m_canceled {false} |
| std::function< void()> | m_on_cancel |
| CancelProbe * | m_probe {nullptr} |
Helper class that detects when a promise is canceled.
Used to detect canceled requests and prevent potential crashes on unclean disconnects.
In the future, this could also be used to support a way for wrapped C++ methods to detect cancellation (like approach #4 in https://github.com/bitcoin/bitcoin/issues/33575).
|
inline |
|
inline |
| CancelProbe* mp::CancelMonitor::m_probe {nullptr} |