Browse Source

eliminate potential excessive CPU usage

pull/700/head
orignal 8 years ago
parent
commit
7bff4db483
  1. 9
      Identity.cpp

9
Identity.cpp

@ -385,7 +385,14 @@ namespace data @@ -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

Loading…
Cancel
Save