Set a pending recompute event to run after the in-progress one finishes
Why: Before this patch we'd ignore any recompute event coming during an in-progress computation. That assumes the history query callback is the last task to run before the computation completes. However, since we are going to add SortingLSH based computation after the history callback, and the check (i.e. file read) is async, the original assumption no longer holds. And there could be races. What: This CL handles of recompute that comes during an in-progress computation. We'll use a member variable to keep track of the last recompute event (trigger) that we weren't able to handle. After the current one completes, we'll ignore its result, and we'll recompute again using that pending trigger. Bug: 1062736 Change-Id: I3e30d26d47352480faa39494b0f6b4171f361456 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2437782Reviewed-by:Josh Karlin <jkarlin@chromium.org> Commit-Queue: Yao Xiao <yaoxia@chromium.org> Cr-Commit-Position: refs/heads/master@{#811827}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment