We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ca9452 commit 825e0d2Copy full SHA for 825e0d2
src/bootstrapper.cc
@@ -3,6 +3,8 @@
3
#include "node_internals.h"
4
#include "v8.h"
5
6
+#include <atomic>
7
+
8
namespace node {
9
10
using v8::Array;
@@ -51,8 +53,8 @@ void SetupNextTick(const FunctionCallbackInfo<Value>& args) {
51
53
}
52
54
55
void PromiseRejectCallback(PromiseRejectMessage message) {
- static uint64_t unhandledRejections = 0;
- static uint64_t rejectionsHandledAfter = 0;
56
+ static std::atomic_uint64_t unhandledRejections{0};
57
+ static std::atomic_uint64_t rejectionsHandledAfter{0};
58
59
Local<Promise> promise = message.GetPromise();
60
Isolate* isolate = promise->GetIsolate();
0 commit comments