Optimize code

This commit is contained in:
Mubelotix
2025-08-07 10:20:10 +02:00
parent 5309a37fb0
commit 4ae43eb51a

View File

@ -727,9 +727,7 @@ impl IndexScheduler {
// If the registered task is a task cancelation
// we inform the processing tasks to stop (if necessary).
if let KindWithContent::TaskCancelation { tasks, .. } = kind {
let tasks_to_cancel = RoaringBitmap::from_iter(tasks);
if self.processing_tasks.read().unwrap().must_cancel_processing_tasks(&tasks_to_cancel)
{
if self.processing_tasks.read().unwrap().must_cancel_processing_tasks(&tasks) {
self.scheduler.must_stop_processing.must_stop();
}
}