Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Roblox
GitHub Repository: Roblox/luau
Path: blob/master/Analysis/include/Luau/Cancellation.h
2727 views
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
6
namespace Luau
7
{
8
9
struct 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