Re-land 8810 "- Add a SetPriority method to ThreadWr..."

> Revert 8810 "- Add a SetPriority method to ThreadWrapper"
> Seeing if this is causing roll issues.
> 
> > - Add a SetPriority method to ThreadWrapper
> > - Remove 'priority' from CreateThread and related member variables from implementations
> > - Make supplying a name for threads, non-optional
> > 
> > BUG=
> > R=magjed@webrtc.org
> > 
> > Review URL: https://webrtc-codereview.appspot.com/44729004
> 
> TBR=tommi@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/48609004

TBR=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/50459005

Cr-Commit-Position: refs/heads/master@{#8819}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8819 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
tommi@webrtc.org
2015-03-22 14:41:46 +00:00
parent 90a1cb4630
commit 38492c5b6f
49 changed files with 195 additions and 192 deletions

View File

@ -285,18 +285,11 @@ class AudioCodingModuleMtTest : public AudioCodingModuleTest {
AudioCodingModuleMtTest()
: AudioCodingModuleTest(),
send_thread_(ThreadWrapper::CreateThread(CbSendThread,
this,
kRealtimePriority,
"send")),
insert_packet_thread_(ThreadWrapper::CreateThread(CbInsertPacketThread,
this,
kRealtimePriority,
"insert_packet")),
pull_audio_thread_(ThreadWrapper::CreateThread(CbPullAudioThread,
this,
kRealtimePriority,
"pull_audio")),
send_thread_(ThreadWrapper::CreateThread(CbSendThread, this, "send")),
insert_packet_thread_(ThreadWrapper::CreateThread(
CbInsertPacketThread, this, "insert_packet")),
pull_audio_thread_(ThreadWrapper::CreateThread(
CbPullAudioThread, this, "pull_audio")),
test_complete_(EventWrapper::Create()),
send_count_(0),
insert_packet_count_(0),
@ -315,8 +308,11 @@ class AudioCodingModuleMtTest : public AudioCodingModuleTest {
void StartThreads() {
ASSERT_TRUE(send_thread_->Start());
send_thread_->SetPriority(kRealtimePriority);
ASSERT_TRUE(insert_packet_thread_->Start());
insert_packet_thread_->SetPriority(kRealtimePriority);
ASSERT_TRUE(pull_audio_thread_->Start());
pull_audio_thread_->SetPriority(kRealtimePriority);
}
void TearDown() override {

View File

@ -462,18 +462,11 @@ class AudioCodingModuleMtTestOldApi : public AudioCodingModuleTestOldApi {
AudioCodingModuleMtTestOldApi()
: AudioCodingModuleTestOldApi(),
send_thread_(ThreadWrapper::CreateThread(CbSendThread,
this,
kRealtimePriority,
"send")),
insert_packet_thread_(ThreadWrapper::CreateThread(CbInsertPacketThread,
this,
kRealtimePriority,
"insert_packet")),
pull_audio_thread_(ThreadWrapper::CreateThread(CbPullAudioThread,
this,
kRealtimePriority,
"pull_audio")),
send_thread_(ThreadWrapper::CreateThread(CbSendThread, this, "send")),
insert_packet_thread_(ThreadWrapper::CreateThread(
CbInsertPacketThread, this, "insert_packet")),
pull_audio_thread_(ThreadWrapper::CreateThread(
CbPullAudioThread, this, "pull_audio")),
test_complete_(EventWrapper::Create()),
send_count_(0),
insert_packet_count_(0),
@ -492,8 +485,11 @@ class AudioCodingModuleMtTestOldApi : public AudioCodingModuleTestOldApi {
void StartThreads() {
ASSERT_TRUE(send_thread_->Start());
send_thread_->SetPriority(kRealtimePriority);
ASSERT_TRUE(insert_packet_thread_->Start());
insert_packet_thread_->SetPriority(kRealtimePriority);
ASSERT_TRUE(pull_audio_thread_->Start());
pull_audio_thread_->SetPriority(kRealtimePriority);
}
void TearDown() {