eliminate potential excessive CPU usage

This commit is contained in:
orignal 2016-11-06 09:53:45 -05:00
parent 9208da8a50
commit 7bff4db483

View File

@ -385,7 +385,14 @@ namespace data
else
{
delete verifier;
while (!m_Verifier) ; // spin lock
int count = 0;
while (!m_Verifier && count < 500) // 5 seconds
{
std::this_thread::sleep_for (std::chrono::milliseconds(10));
count++;
}
if (!m_Verifier)
LogPrint (eLogError, "Identity: couldn't get verifier in 5 seconds");
}
}
else