diff options
author | Chris Robinson <[email protected]> | 2020-04-07 12:36:44 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-04-07 12:36:44 -0700 |
commit | 0077a0166756bf0cdd1193b0d66f8306ed909eb9 (patch) | |
tree | 52f6d84464631b4a9f2764434c5cb2d5e7de8cca | |
parent | f628ab2151ac8a0fc72ede0dd32bbbf5efcc1258 (diff) |
Don't yield the CPU when waiting for updates to finish
-rw-r--r-- | alc/alc.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index 8d40e784..bd88023b 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -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); |