Remove counter, yield everytime

This commit is contained in:
Leeingnyo
2021-09-18 10:59:43 +09:00
parent 9769e760a0
commit b56e16e1e1
5 changed files with 6 additions and 25 deletions
-14
View File
@@ -134,21 +134,7 @@ class TitleInfo
end
end
class YieldCounter
@file_count : UInt32
def initialize(@threshold : Int32)
@file_count = 0
end
def count_and_yield
@file_count += 1
Fiber.yield if @threshold > 0 && @file_count % @threshold == 0
end
end
alias ExamineContext = NamedTuple(
file_counter: YieldCounter,
cached_contents_signature: Hash(String, String),
deleted_title_ids: Array(String),
deleted_entry_ids: Array(String))