Skip empty batches in processing_queue
(#4008)
This commit is contained in:
parent
9d72243ef7
commit
7cd66fa461
1 changed files with 7 additions and 4 deletions
|
@ -145,10 +145,13 @@ private:
|
|||
while (!stopped)
|
||||
{
|
||||
auto batch = next_batch (lock);
|
||||
lock.unlock ();
|
||||
stats.inc (stat_type, nano::stat::detail::batch);
|
||||
process_batch (batch);
|
||||
lock.lock ();
|
||||
if (!batch.empty ())
|
||||
{
|
||||
lock.unlock ();
|
||||
stats.inc (stat_type, nano::stat::detail::batch);
|
||||
process_batch (batch);
|
||||
lock.lock ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue