Don't yield the CPU when waiting for updates to finish

This commit is contained in:
Chris Robinson
2020-04-07 12:36:44 -07:00
parent f628ab2151
commit 0077a01667
+3 -2
View File
@@ -1627,8 +1627,9 @@ void ALCcontext::processUpdates()
* updating to finish, before providing updates.
*/
mHoldUpdates.store(true, std::memory_order_release);
while((mUpdateCount.load(std::memory_order_acquire)&1) != 0)
std::this_thread::yield();
while((mUpdateCount.load(std::memory_order_acquire)&1) != 0) {
/* busy-wait */
}
if(!mPropsClean.test_and_set(std::memory_order_acq_rel))
UpdateContextProps(this);