mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 13:25:45 +02:00
roots: clean up crawl_master
Remove some broken #if 0 code, and take advantage of new Task non-repeating execution semantics. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
4f032ab85b
commit
ffac407a9b
@ -375,20 +375,11 @@ BeesRoots::crawl_thread()
|
||||
m_crawl_task = Task("crawl_master", [shared_this]() {
|
||||
auto tqs = TaskMaster::get_queue_count();
|
||||
BEESNOTE("queueing extents to scan, " << tqs << " of " << BEES_MAX_QUEUE_SIZE);
|
||||
#if 0
|
||||
bool run_again = true;
|
||||
while (tqs < BEES_MAX_QUEUE_SIZE && run_again) {
|
||||
run_again = shared_this->crawl_roots();
|
||||
tqs = TaskMaster::get_queue_count();
|
||||
}
|
||||
#else
|
||||
bool run_again = false;
|
||||
while (tqs < BEES_MAX_QUEUE_SIZE) {
|
||||
run_again = shared_this->crawl_roots();
|
||||
tqs = TaskMaster::get_queue_count();
|
||||
if (!run_again) break;
|
||||
}
|
||||
#endif
|
||||
if (run_again) {
|
||||
shared_this->m_crawl_task.run();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user