Support BlockingType::MAY_BLOCK in SchedulerWorkerDelegateImpl |
|
Issue descriptionSchedulerWorkerDelegateImpl::BlockingScopeEntered and SchedulerWorkerDelegateImpl::BlockingScopeExited only supports BlockingType::WILL_BLOCK. MAY_BLOCK should also be supported for calls that might or not might block.
,
Sep 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dcbe7e7c4a00cfb5673e18f568aa2b9e4169b8e8 commit dcbe7e7c4a00cfb5673e18f568aa2b9e4169b8e8 Author: Francois Doray <fdoray@chromium.org> Date: Tue Sep 05 18:44:43 2017 Support BlockingType::MAY_BLOCK in SchedulerWorkerDelegateImpl. Initially written by jeffreyhe@: https://chromium-review.googlesource.com/c/chromium/src/+/633277 This CL adds support for BlockingType::MAY_BLOCK. SchedulerWorkerDelegateImpl::BlockingScopeEntered() will record a timestamp of when the worker was blocked. This timestamp is used to determine whether a thread has been in the scope of a ScopedBlockingCall long enough that |worker_capacity_| needs to be increased. When the last idle worker gets woken up, a task will be posted to the service thread that will cause these timestamps to be periodically monitored. In this CL, BlockingType::WILL_BLOCK will continue to have its |worker_capacity_| increases be done immediately when ScopedBlockingCall is instantiated. Bug: 757475 Change-Id: Ic7b5fc8c4d1f77adda48cafee262f3cbeff1711c Reviewed-on: https://chromium-review.googlesource.com/639330 Commit-Queue: Francois Doray <fdoray@chromium.org> Reviewed-by: Gabriel Charette <gab@chromium.org> Reviewed-by: Robert Liao <robliao@chromium.org> Cr-Commit-Position: refs/heads/master@{#499689} [modify] https://crrev.com/dcbe7e7c4a00cfb5673e18f568aa2b9e4169b8e8/base/task_scheduler/scheduler_worker_pool_impl.cc [modify] https://crrev.com/dcbe7e7c4a00cfb5673e18f568aa2b9e4169b8e8/base/task_scheduler/scheduler_worker_pool_impl.h [modify] https://crrev.com/dcbe7e7c4a00cfb5673e18f568aa2b9e4169b8e8/base/task_scheduler/scheduler_worker_pool_impl_unittest.cc [modify] https://crrev.com/dcbe7e7c4a00cfb5673e18f568aa2b9e4169b8e8/base/task_scheduler/scheduler_worker_pool_unittest.cc [modify] https://crrev.com/dcbe7e7c4a00cfb5673e18f568aa2b9e4169b8e8/base/task_scheduler/task_scheduler_impl.cc
,
Apr 12 2018
|
|
►
Sign in to add a comment |
|
Comment 1 by jeffreyhe@google.com
, Aug 21 2017