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

Side by Side Diff: base/task_scheduler/scheduler_lock.cc

Issue 1705253002: TaskScheduler [3/9] Task and Sequence (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s_1_scheduler_lock
Patch Set: self review Created 4 years, 10 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/task_scheduler/scheduler_lock.h" 5 #include "base/task_scheduler/scheduler_lock.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <unordered_map> 8 #include <unordered_map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 SafeAcquisitionTracker::GetInstance()->RecordAcquisition(this)); 125 SafeAcquisitionTracker::GetInstance()->RecordAcquisition(this));
126 } 126 }
127 127
128 void SchedulerLock::Release() { 128 void SchedulerLock::Release() {
129 lock_.Release(); 129 lock_.Release();
130 DCHECK_ON_ONLY(SafeAcquisitionTracker::GetInstance()->RecordRelease(this)); 130 DCHECK_ON_ONLY(SafeAcquisitionTracker::GetInstance()->RecordRelease(this));
131 } 131 }
132 132
133 scoped_ptr<ConditionVariable> SchedulerLock::CreateConditionVariable() { 133 scoped_ptr<ConditionVariable> SchedulerLock::CreateConditionVariable() {
134 scoped_ptr<ConditionVariable> cond_var(new ConditionVariable(&lock_)); 134 scoped_ptr<ConditionVariable> cond_var(new ConditionVariable(&lock_));
135 return std::move(cond_var); 135 return cond_var;
136 } 136 }
137 137
138 } // namespace internal 138 } // namespace internal
139 } // base 139 } // base
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/task_scheduler/sequence.h » ('j') | base/task_scheduler/sequence.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698