15 :
std::runtime_error(
"Simulation cancelled")
A thread-safe cancellation token for C++ AVM simulation.
CancellationToken(const CancellationToken &)=delete
bool is_cancelled() const
Check if cancellation has been signaled. Called from C++ simulation thread.
std::atomic< bool > cancelled_
void check_and_throw() const
Check and throw if cancelled. Called from C++ simulation thread.
void cancel()
Signal cancellation. Called from TypeScript thread.
CancellationToken & operator=(const CancellationToken &)=delete
CancellationToken(CancellationToken &&)=delete
CancellationToken & operator=(CancellationToken &&)=delete
Exception thrown when simulation is cancelled.
std::shared_ptr< CancellationToken > CancellationTokenPtr
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept