1// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details 2#pragma once 3 4#include <atomic> 5 6namespace Luau 7{ 8 9struct FrontendCancellationToken 10{ 11 void cancel() 12 { 13 cancelled.store(true); 14 } 15 16 bool requested() 17 { 18 return cancelled.load(); 19 } 20 21 std::atomic<bool> cancelled; 22}; 23 24} // namespace Luau 25 26