Add a check that atomic<DataStatus> is lock free
This commit is contained in:
parent
e74ab54793
commit
0de71d8e1b
1 changed files with 4 additions and 0 deletions
|
|
@ -90,6 +90,10 @@ void streamFromFile(SndfileHandle& sndFile, uint32_t numFrames, sfz::Oversamplin
|
||||||
sfz::FilePool::FilePool(sfz::Logger& logger)
|
sfz::FilePool::FilePool(sfz::Logger& logger)
|
||||||
: logger(logger)
|
: logger(logger)
|
||||||
{
|
{
|
||||||
|
FilePromise promise;
|
||||||
|
if (!promise.dataStatus.is_lock_free())
|
||||||
|
DBG("atomic<DataStatus> is not lock-free; could cause issues with locking");
|
||||||
|
|
||||||
for (int i = 0; i < config::numBackgroundThreads; ++i)
|
for (int i = 0; i < config::numBackgroundThreads; ++i)
|
||||||
threadPool.emplace_back( &FilePool::loadingThread, this );
|
threadPool.emplace_back( &FilePool::loadingThread, this );
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue