OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 rtc::CritScope lock(&lock_); | 126 rtc::CritScope lock(&lock_); |
127 queue_.push(task.release()); | 127 queue_.push(task.release()); |
128 } | 128 } |
129 wake_up_->Set(); | 129 wake_up_->Set(); |
130 } | 130 } |
131 | 131 |
132 void ProcessThreadImpl::RegisterModule(Module* module) { | 132 void ProcessThreadImpl::RegisterModule(Module* module) { |
133 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 133 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
134 RTC_DCHECK(module); | 134 RTC_DCHECK(module); |
135 | 135 |
136 #if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) | 136 #if RTC_DCHECK_IS_ON |
137 { | 137 { |
138 // Catch programmer error. | 138 // Catch programmer error. |
139 rtc::CritScope lock(&lock_); | 139 rtc::CritScope lock(&lock_); |
140 for (const ModuleCallback& mc : modules_) | 140 for (const ModuleCallback& mc : modules_) |
141 RTC_DCHECK(mc.module != module); | 141 RTC_DCHECK(mc.module != module); |
142 } | 142 } |
143 #endif | 143 #endif |
144 | 144 |
145 // Now that we know the module isn't in the list, we'll call out to notify | 145 // Now that we know the module isn't in the list, we'll call out to notify |
146 // the module that it's attached to the worker thread. We don't hold | 146 // the module that it's attached to the worker thread. We don't hold |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 } | 228 } |
229 } | 229 } |
230 | 230 |
231 int64_t time_to_wait = next_checkpoint - rtc::TimeMillis(); | 231 int64_t time_to_wait = next_checkpoint - rtc::TimeMillis(); |
232 if (time_to_wait > 0) | 232 if (time_to_wait > 0) |
233 wake_up_->Wait(static_cast<unsigned long>(time_to_wait)); | 233 wake_up_->Wait(static_cast<unsigned long>(time_to_wait)); |
234 | 234 |
235 return true; | 235 return true; |
236 } | 236 } |
237 } // namespace webrtc | 237 } // namespace webrtc |
OLD | NEW |