diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-13 12:18:27 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-13 12:18:27 +0200 |
commit | 6177a3c6b5a05ac2c64978ccf3ca11de9793505b (patch) | |
tree | f0b0e06c2c7c4f97c0069a0822574dd449e27296 /src/lane.h | |
parent | dddc28153796f9c8eb256eddb335c8643226fd0b (diff) | |
download | lanes-6177a3c6b5a05ac2c64978ccf3ca11de9793505b.tar.gz lanes-6177a3c6b5a05ac2c64978ccf3ca11de9793505b.tar.bz2 lanes-6177a3c6b5a05ac2c64978ccf3ca11de9793505b.zip |
A small step toward making clang happy
Diffstat (limited to 'src/lane.h')
-rw-r--r-- | src/lane.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -69,8 +69,12 @@ class Lane | |||
69 | 69 | ||
70 | // the thread | 70 | // the thread |
71 | std::jthread thread; | 71 | std::jthread thread; |
72 | #ifndef __PROSPERO__ | ||
72 | // a latch to wait for the lua_State to be ready | 73 | // a latch to wait for the lua_State to be ready |
73 | std::latch ready{ 1 }; | 74 | std::latch ready{ 1 }; |
75 | #else // __PROSPERO__ | ||
76 | std::atomic_flag ready{}; | ||
77 | #endif // __PROSPERO__ | ||
74 | // to wait for stop requests through thread's stop_source | 78 | // to wait for stop requests through thread's stop_source |
75 | std::mutex doneMutex; | 79 | std::mutex doneMutex; |
76 | std::condition_variable doneCondVar; // use condition_variable_any if waiting for a stop_token | 80 | std::condition_variable doneCondVar; // use condition_variable_any if waiting for a stop_token |