mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 15:05:53 +00:00
Don't spin when an IO+ thread returns to the job queue.
This commit is contained in:
@@ -291,12 +291,19 @@ void JobQueue::threadEntry()
|
||||
while (1)
|
||||
{
|
||||
NameThread("waiting");
|
||||
bool didIO = false;
|
||||
while (mJobSet.empty() && !mShuttingDown)
|
||||
{
|
||||
if ((mIOThreadCount < mMaxIOThreadCount) && !theApp->isShutdown())
|
||||
if ((mIOThreadCount < mMaxIOThreadCount) && !didIO && !theApp->isShutdown())
|
||||
{
|
||||
IOThread(sl);
|
||||
didIO = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
mJobCond.wait(sl);
|
||||
didIO = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (mShuttingDown)
|
||||
|
||||
Reference in New Issue
Block a user