Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1105)

Unified Diff: base/task_scheduler/scheduler_worker_pool_impl.cc

Issue 2531883002: TaskScheduler: Set the IO allowed bit in TaskTracker::RunTask(). (Closed)
Patch Set: CR robliao #22 (reorder reset) Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/task_scheduler/scheduler_worker_pool_impl.cc
diff --git a/base/task_scheduler/scheduler_worker_pool_impl.cc b/base/task_scheduler/scheduler_worker_pool_impl.cc
index f2d69344f4cfb6da35f4932b6ad3aa4ba0d7d739..a0ba116c2ac2020b318e8bedf72052cd8d4eea6d 100644
--- a/base/task_scheduler/scheduler_worker_pool_impl.cc
+++ b/base/task_scheduler/scheduler_worker_pool_impl.cc
@@ -310,7 +310,6 @@ std::unique_ptr<SchedulerWorkerPoolImpl> SchedulerWorkerPoolImpl::Create(
DelayedTaskManager* delayed_task_manager) {
std::unique_ptr<SchedulerWorkerPoolImpl> worker_pool(
new SchedulerWorkerPoolImpl(params.name(),
danakj 2016/11/28 22:55:56 fwiw auto & makeunique would be nice here
fdoray 2016/11/29 15:41:20 Done. WrapUnique instead of MakeUnique because the
- params.io_restriction(),
params.suggested_reclaim_time(),
task_tracker, delayed_task_manager));
if (worker_pool->Initialize(
@@ -519,10 +518,6 @@ void SchedulerWorkerPoolImpl::SchedulerWorkerDelegateImpl::OnMainEntry(
// New threads haven't run GetWork() yet, so reset the |idle_start_time_|.
idle_start_time_ = TimeTicks();
-
- ThreadRestrictions::SetIOAllowed(
- outer_->io_restriction_ ==
- SchedulerWorkerPoolParams::IORestriction::ALLOWED);
}
scoped_refptr<Sequence>
@@ -676,12 +671,10 @@ void SchedulerWorkerPoolImpl::SchedulerWorkerDelegateImpl::OnDetach() {
SchedulerWorkerPoolImpl::SchedulerWorkerPoolImpl(
StringPiece name,
- SchedulerWorkerPoolParams::IORestriction io_restriction,
const TimeDelta& suggested_reclaim_time,
TaskTracker* task_tracker,
DelayedTaskManager* delayed_task_manager)
: name_(name.as_string()),
- io_restriction_(io_restriction),
suggested_reclaim_time_(suggested_reclaim_time),
idle_workers_stack_lock_(shared_priority_queue_.container_lock()),
idle_workers_stack_cv_for_testing_(

Powered by Google App Engine
This is Rietveld 408576698