mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-15 19:52:19 +00:00
Use an atomic variable for tracking instanceIds in HttpDataStream
This commit is contained in:
parent
b563d512d1
commit
ed4f2440a6
@ -51,6 +51,7 @@
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <chrono>
|
||||
#include <atomic>
|
||||
|
||||
/* meh... */
|
||||
#include <../../3rdparty/include/nlohmann/json.hpp>
|
||||
@ -75,7 +76,7 @@ static IEnvironment* environment;
|
||||
static LruDiskCache diskCache;
|
||||
static std::string cachePath;
|
||||
static IPreferences* prefs;
|
||||
static int64_t nextInstanceId = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
|
||||
static std::atomic<int64_t> nextInstanceId = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
|
||||
|
||||
static const int kDefaultMaxCacheFiles = 35;
|
||||
static const int kDefaultPreCacheSizeBytes = 524288; /*2^19 */
|
||||
|
Loading…
Reference in New Issue
Block a user