- 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

Cr-Commit-Position: refs/heads/master@{#8810}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8810 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
tommi@webrtc.org
2015-03-20 15:51:39 +00:00
parent 66df3cf7ab
commit b6817d793f
49 changed files with 195 additions and 192 deletions

View File

@ -532,40 +532,36 @@ void APITest::Perform() {
// A
// PUSH
rtc::scoped_ptr<ThreadWrapper> myPushAudioThreadA =
ThreadWrapper::CreateThread(PushAudioThreadA, this, kNormalPriority,
"PushAudioThreadA");
ThreadWrapper::CreateThread(PushAudioThreadA, this, "PushAudioThreadA");
CHECK_THREAD_NULLITY(myPushAudioThreadA, "Unable to start A::PUSH thread");
// PULL
rtc::scoped_ptr<ThreadWrapper> myPullAudioThreadA =
ThreadWrapper::CreateThread(PullAudioThreadA, this, kNormalPriority,
"PullAudioThreadA");
ThreadWrapper::CreateThread(PullAudioThreadA, this, "PullAudioThreadA");
CHECK_THREAD_NULLITY(myPullAudioThreadA, "Unable to start A::PULL thread");
// Process
rtc::scoped_ptr<ThreadWrapper> myProcessThreadA = ThreadWrapper::CreateThread(
ProcessThreadA, this, kNormalPriority, "ProcessThreadA");
ProcessThreadA, this, "ProcessThreadA");
CHECK_THREAD_NULLITY(myProcessThreadA, "Unable to start A::Process thread");
// API
rtc::scoped_ptr<ThreadWrapper> myAPIThreadA = ThreadWrapper::CreateThread(
APIThreadA, this, kNormalPriority, "APIThreadA");
APIThreadA, this, "APIThreadA");
CHECK_THREAD_NULLITY(myAPIThreadA, "Unable to start A::API thread");
// B
// PUSH
rtc::scoped_ptr<ThreadWrapper> myPushAudioThreadB =
ThreadWrapper::CreateThread(PushAudioThreadB, this, kNormalPriority,
"PushAudioThreadB");
ThreadWrapper::CreateThread(PushAudioThreadB, this, "PushAudioThreadB");
CHECK_THREAD_NULLITY(myPushAudioThreadB, "Unable to start B::PUSH thread");
// PULL
rtc::scoped_ptr<ThreadWrapper> myPullAudioThreadB =
ThreadWrapper::CreateThread(PullAudioThreadB, this, kNormalPriority,
"PullAudioThreadB");
ThreadWrapper::CreateThread(PullAudioThreadB, this, "PullAudioThreadB");
CHECK_THREAD_NULLITY(myPullAudioThreadB, "Unable to start B::PULL thread");
// Process
rtc::scoped_ptr<ThreadWrapper> myProcessThreadB = ThreadWrapper::CreateThread(
ProcessThreadB, this, kNormalPriority, "ProcessThreadB");
ProcessThreadB, this, "ProcessThreadB");
CHECK_THREAD_NULLITY(myProcessThreadB, "Unable to start B::Process thread");
// API
rtc::scoped_ptr<ThreadWrapper> myAPIThreadB = ThreadWrapper::CreateThread(
APIThreadB, this, kNormalPriority, "APIThreadB");
APIThreadB, this, "APIThreadB");
CHECK_THREAD_NULLITY(myAPIThreadB, "Unable to start B::API thread");
//_apiEventA->StartTimer(true, 5000);