Use std::atomic for counters

This commit is contained in:
Lovell Fuller
2023-09-30 14:01:04 +01:00
parent 265d70111a
commit 70ac6905c7
6 changed files with 16 additions and 16 deletions

View File

@@ -166,10 +166,10 @@ namespace sharp {
}
// How many tasks are in the queue?
volatile int counterQueue = 0;
std::atomic<int> counterQueue{0};
// How many tasks are being processed?
volatile int counterProcess = 0;
std::atomic<int> counterProcess{0};
// Filename extension checkers
static bool EndsWith(std::string const &str, std::string const &end) {