Clean up PlatformThread.
* Move PlatformThread to rtc::. * Remove ::CreateThread factory method. * Make non-scoped_ptr from a lot of invocations. * Make Start/Stop void. * Remove rtc::Thread priorities, which were unused and would collide. * Add ::IsRunning() to PlatformThread. BUG= R=tommi@webrtc.org Review URL: https://codereview.webrtc.org/1476453002 . Cr-Commit-Position: refs/heads/master@{#10812}
This commit is contained in:
@ -76,9 +76,9 @@ void ProcessThreadImpl::Start() {
|
||||
m.module->ProcessThreadAttached(this);
|
||||
}
|
||||
|
||||
thread_ =
|
||||
PlatformThread::CreateThread(&ProcessThreadImpl::Run, this, thread_name_);
|
||||
RTC_CHECK(thread_->Start());
|
||||
thread_.reset(
|
||||
new rtc::PlatformThread(&ProcessThreadImpl::Run, this, thread_name_));
|
||||
thread_->Start();
|
||||
}
|
||||
|
||||
void ProcessThreadImpl::Stop() {
|
||||
@ -93,7 +93,7 @@ void ProcessThreadImpl::Stop() {
|
||||
|
||||
wake_up_->Set();
|
||||
|
||||
RTC_CHECK(thread_->Stop());
|
||||
thread_->Stop();
|
||||
stop_ = false;
|
||||
|
||||
// TODO(tommi): Since DeRegisterModule is currently being called from
|
||||
|
||||
Reference in New Issue
Block a user