mirror of
https://github.com/Zygo/bees.git
synced 2025-07-01 16:22:27 +02:00
extent scan: extra check to make sure no Tasks are started when throttled
Previously `scan()` would run the extent scan loop once, and enqueue one extent, before checking for throttling. Do an extra check before that, and bail out so that zero extents are enqueued when throttled. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
@ -899,6 +899,9 @@ BeesScanModeExtent::scan()
|
|||||||
{
|
{
|
||||||
BEESTRACE("bsm scan");
|
BEESTRACE("bsm scan");
|
||||||
|
|
||||||
|
// Do nothing if we are throttled
|
||||||
|
if (should_throttle()) return;
|
||||||
|
|
||||||
unique_lock<mutex> lock(m_mutex);
|
unique_lock<mutex> lock(m_mutex);
|
||||||
const auto size_tiers_copy = m_size_tiers;
|
const auto size_tiers_copy = m_size_tiers;
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
|
Reference in New Issue
Block a user