TaskScheduler: Prevent single-threaded CONTINUE_ON_SHUTDOWN from blocking shutdown.
Previously, tasks posted to a shared SingleThreadTaskRunner with the same traits were scheduled on the same thread. If single-threaded task A (BACKGROUND, CONTINUE_ON_SHUTDOWN) was scheduled on the thread and single-threaded task B (BACKGROUND, BLOCK_SHUTDOWN) was posted afterwards, shutdown could not complete until task A finished and allowed task B to run on the thread. This CL fixes the issue by scheduling shared single-threaded tasks that are CONTINUE_ON_SHUTDOWN/non-CONTINUE_ON_SHUTDOWN on different threads. Bug: 829786 Change-Id: Ia0b556971895c2a5799157f8dcf1a1ee6ce650c9 Reviewed-on: https://chromium-review.googlesource.com/1005422 Commit-Queue: François Doray <fdoray@chromium.org> Reviewed-by:Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/master@{#550216}
Showing
Please register or sign in to comment