mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-17 02:49:19 +00:00
Fix 100% cpu usage on osx bug
This commit is contained in:
parent
8ff1873096
commit
8f9123a157
@ -274,8 +274,9 @@ typedef CMutexLock<CWaitableCriticalSection> CWaitableCriticalBlock;
|
||||
typedef boost::interprocess::interprocess_condition CConditionVariable;
|
||||
|
||||
/** Wait for a given condition inside a WAITABLE_CRITICAL_BLOCK */
|
||||
/** Sleep(1) is to workaround a 100% cpu-usage bug on OSX **/
|
||||
#define WAIT(name,condition) \
|
||||
do { while(!(condition)) { (name).wait(waitablecriticalblock.GetLock()); } } while(0)
|
||||
do { while(!(condition)) { (name).wait(waitablecriticalblock.GetLock()); Sleep(1);} } while(0)
|
||||
|
||||
/** Notify waiting threads that a condition may hold now */
|
||||
#define NOTIFY(name) \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user