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 Cr-Commit-Position: refs/heads/master@{#8818} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8818 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -285,11 +285,18 @@ class AudioCodingModuleMtTest : public AudioCodingModuleTest {
|
||||
|
||||
AudioCodingModuleMtTest()
|
||||
: AudioCodingModuleTest(),
|
||||
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")),
|
||||
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")),
|
||||
test_complete_(EventWrapper::Create()),
|
||||
send_count_(0),
|
||||
insert_packet_count_(0),
|
||||
@ -308,11 +315,8 @@ 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 {
|
||||
|
@ -462,11 +462,18 @@ class AudioCodingModuleMtTestOldApi : public AudioCodingModuleTestOldApi {
|
||||
|
||||
AudioCodingModuleMtTestOldApi()
|
||||
: AudioCodingModuleTestOldApi(),
|
||||
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")),
|
||||
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")),
|
||||
test_complete_(EventWrapper::Create()),
|
||||
send_count_(0),
|
||||
insert_packet_count_(0),
|
||||
@ -485,11 +492,8 @@ 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() {
|
||||
|
@ -532,36 +532,40 @@ void APITest::Perform() {
|
||||
// A
|
||||
// PUSH
|
||||
rtc::scoped_ptr<ThreadWrapper> myPushAudioThreadA =
|
||||
ThreadWrapper::CreateThread(PushAudioThreadA, this, "PushAudioThreadA");
|
||||
ThreadWrapper::CreateThread(PushAudioThreadA, this, kNormalPriority,
|
||||
"PushAudioThreadA");
|
||||
CHECK_THREAD_NULLITY(myPushAudioThreadA, "Unable to start A::PUSH thread");
|
||||
// PULL
|
||||
rtc::scoped_ptr<ThreadWrapper> myPullAudioThreadA =
|
||||
ThreadWrapper::CreateThread(PullAudioThreadA, this, "PullAudioThreadA");
|
||||
ThreadWrapper::CreateThread(PullAudioThreadA, this, kNormalPriority,
|
||||
"PullAudioThreadA");
|
||||
CHECK_THREAD_NULLITY(myPullAudioThreadA, "Unable to start A::PULL thread");
|
||||
// Process
|
||||
rtc::scoped_ptr<ThreadWrapper> myProcessThreadA = ThreadWrapper::CreateThread(
|
||||
ProcessThreadA, this, "ProcessThreadA");
|
||||
ProcessThreadA, this, kNormalPriority, "ProcessThreadA");
|
||||
CHECK_THREAD_NULLITY(myProcessThreadA, "Unable to start A::Process thread");
|
||||
// API
|
||||
rtc::scoped_ptr<ThreadWrapper> myAPIThreadA = ThreadWrapper::CreateThread(
|
||||
APIThreadA, this, "APIThreadA");
|
||||
APIThreadA, this, kNormalPriority, "APIThreadA");
|
||||
CHECK_THREAD_NULLITY(myAPIThreadA, "Unable to start A::API thread");
|
||||
// B
|
||||
// PUSH
|
||||
rtc::scoped_ptr<ThreadWrapper> myPushAudioThreadB =
|
||||
ThreadWrapper::CreateThread(PushAudioThreadB, this, "PushAudioThreadB");
|
||||
ThreadWrapper::CreateThread(PushAudioThreadB, this, kNormalPriority,
|
||||
"PushAudioThreadB");
|
||||
CHECK_THREAD_NULLITY(myPushAudioThreadB, "Unable to start B::PUSH thread");
|
||||
// PULL
|
||||
rtc::scoped_ptr<ThreadWrapper> myPullAudioThreadB =
|
||||
ThreadWrapper::CreateThread(PullAudioThreadB, this, "PullAudioThreadB");
|
||||
ThreadWrapper::CreateThread(PullAudioThreadB, this, kNormalPriority,
|
||||
"PullAudioThreadB");
|
||||
CHECK_THREAD_NULLITY(myPullAudioThreadB, "Unable to start B::PULL thread");
|
||||
// Process
|
||||
rtc::scoped_ptr<ThreadWrapper> myProcessThreadB = ThreadWrapper::CreateThread(
|
||||
ProcessThreadB, this, "ProcessThreadB");
|
||||
ProcessThreadB, this, kNormalPriority, "ProcessThreadB");
|
||||
CHECK_THREAD_NULLITY(myProcessThreadB, "Unable to start B::Process thread");
|
||||
// API
|
||||
rtc::scoped_ptr<ThreadWrapper> myAPIThreadB = ThreadWrapper::CreateThread(
|
||||
APIThreadB, this, "APIThreadB");
|
||||
APIThreadB, this, kNormalPriority, "APIThreadB");
|
||||
CHECK_THREAD_NULLITY(myAPIThreadB, "Unable to start B::API thread");
|
||||
|
||||
//_apiEventA->StartTimer(true, 5000);
|
||||
|
Reference in New Issue
Block a user