Skip to content

Commit f557870

Browse files
committed
Mark variable atomic as it is being altered in a separate thread
1 parent 45995c4 commit f557870

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/player.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include <string>
4343
#include <bitset>
4444
#include <thread>
45+
#include <atomic>
4546

4647
#ifdef HAVE_TSID
4748
# if HAVE_TSID > 1
@@ -216,7 +217,7 @@ class ConsolePlayer
216217
struct m_timer_t
217218
{ // secs
218219
uint_least32_t start;
219-
uint_least32_t current;
220+
std::atomic<uint_least32_t> current;
220221
uint_least32_t stop;
221222
uint_least32_t length;
222223
bool valid;

0 commit comments

Comments
 (0)