mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
use usleep when waiting for cref to be available
This commit is contained in:
parent
f827bebf80
commit
39d12d088a
1 changed files with 3 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "crefmgr.h"
|
||||
#include "cref.h"
|
||||
|
@ -413,6 +414,8 @@ CRefMgr::getCookieRef( CookieID cid, bool failOk )
|
|||
break;
|
||||
}
|
||||
m_cidlock->Relinquish( cinfo, true );
|
||||
logf( XW_LOGINFO, "%s: sleeping after failing to get cinfo", __func__ );
|
||||
usleep(200000); /* 2/10 second */
|
||||
}
|
||||
return cinfo;
|
||||
} /* getCookieRef */
|
||||
|
|
Loading…
Reference in a new issue