Mirror von
https://github.com/tkuschel/bees.git
synchronisiert 2026-05-08 04:59:37 +02:00
roots: if queue is full run again
The task queue may already be full of tasks when the crawl task is executed. In this case simply reschedule the crawl task at the end of the current queue. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
Dieser Commit ist enthalten in:
@@ -380,13 +380,10 @@ 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);
|
||||
bool run_again = false;
|
||||
while (tqs < BEES_MAX_QUEUE_SIZE) {
|
||||
bool run_again = true;
|
||||
while (tqs < BEES_MAX_QUEUE_SIZE && run_again) {
|
||||
run_again = shared_this->crawl_roots();
|
||||
tqs = TaskMaster::get_queue_count();
|
||||
if (!run_again) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (run_again) {
|
||||
shared_this->m_crawl_task.run();
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren