Apply yield forcely

This commit is contained in:
Leeingnyo
2021-09-14 22:51:37 +09:00
parent 2e09efbd62
commit 670cf54957
3 changed files with 7 additions and 0 deletions
+5
View File
@@ -140,3 +140,8 @@ alias ExamineContext = NamedTuple(
deleted_title_ids: Array(String),
deleted_entry_ids: Array(String)
)
def yield_process_file(context : ExamineContext)
context["file_count"] += 1
Fiber.yield if context["file_count"] % 1000 == 0
end