Wrong method called on the queue to check if empty
`size()` is the max size
This commit is contained in:
parent
a30e539127
commit
d9dfbaf06f
1 changed files with 5 additions and 2 deletions
|
|
@ -358,9 +358,12 @@ void sfz::FilePool::waitForBackgroundLoading() noexcept
|
||||||
// TODO: validate that this is enough, otherwise we will need an atomic count
|
// TODO: validate that this is enough, otherwise we will need an atomic count
|
||||||
// of the files we need to load still.
|
// of the files we need to load still.
|
||||||
// Spinlocking on the size of the background queue
|
// Spinlocking on the size of the background queue
|
||||||
while (promiseQueue.size() > 0)
|
while (!promiseQueue.was_empty()){
|
||||||
std::this_thread::sleep_for(0.1ms);
|
std::this_thread::sleep_for(0.1ms);
|
||||||
|
}
|
||||||
|
|
||||||
// Spinlocking on the threads possibly logging in the background
|
// Spinlocking on the threads possibly logging in the background
|
||||||
while (threadsLoading > 0)
|
while (threadsLoading > 0) {
|
||||||
std::this_thread::sleep_for(0.1ms);
|
std::this_thread::sleep_for(0.1ms);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue