aboutsummaryrefslogtreecommitdiff
path: root/src/universe.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-11-13 10:06:37 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2024-11-13 10:06:37 +0100
commitf45a3f5de2a11065764c87208d3f0b58e6ebe771 (patch)
tree8b1d5e586e7fee575ed2d09a9cb4e7fe4f2101f2 /src/universe.cpp
parent43915511f5e0c74a5aa6e0d02fe62505eb133191 (diff)
downloadlanes-f45a3f5de2a11065764c87208d3f0b58e6ebe771.tar.gz
lanes-f45a3f5de2a11065764c87208d3f0b58e6ebe771.tar.bz2
lanes-f45a3f5de2a11065764c87208d3f0b58e6ebe771.zip
Cleaning up guano
Converted volatile Lane::cancelRequest to std::atomic
Diffstat (limited to 'src/universe.cpp')
-rw-r--r--src/universe.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/universe.cpp b/src/universe.cpp
index 1aafbff..357aa08 100644
--- a/src/universe.cpp
+++ b/src/universe.cpp
@@ -381,7 +381,7 @@ bool Universe::terminateFreeRunningLanes(lua_Duration const shutdownTimeout_, Ca
381 std::lock_guard<std::mutex> _guard{ selfdestructMutex }; 381 std::lock_guard<std::mutex> _guard{ selfdestructMutex };
382 Lane* _lane{ selfdestructFirst }; 382 Lane* _lane{ selfdestructFirst };
383 while (_lane != SELFDESTRUCT_END) { 383 while (_lane != SELFDESTRUCT_END) {
384 if (_lane->cancelRequest != CancelRequest::None) 384 if (_lane->cancelRequest.load(std::memory_order_relaxed) != CancelRequest::None)
385 ++_n; 385 ++_n;
386 _lane = _lane->selfdestruct_next; 386 _lane = _lane->selfdestruct_next;
387 } 387 }