From 0077a0166756bf0cdd1193b0d66f8306ed909eb9 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 7 Apr 2020 12:36:44 -0700 Subject: Don't yield the CPU when waiting for updates to finish --- alc/alc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'alc') 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); -- cgit v1.2.3