Skip to content

Commit 1f46ce2

Browse files
committed
Make terminationRequested atomic
1 parent 7f22f7d commit 1f46ce2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/workerd/jsg/setup.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <kj/mutex.h>
2020
#include <kj/vector.h>
2121

22+
#include <atomic>
2223
#include <typeindex>
2324

2425
namespace workerd::jsg {
@@ -393,7 +394,7 @@ class IsolateBase {
393394
bool usingEnhancedErrorSerialization = false;
394395
bool usingFastJsgStruct = false;
395396
bool extraMicrotaskCheckpointRequested = false;
396-
bool terminationRequested = false;
397+
std::atomic<bool> terminationRequested = false;
397398

398399
// Only used when the original module registry is used.
399400
bool throwOnUnrecognizedImportAssertion = false;

0 commit comments

Comments
 (0)