Remove thread id from ThreadWrapper::Start().
Removes ThreadPosix::InitParams and a corresponding wait for an event. This unblocks ThreadPosix::Start which had to wait for thread scheduling for an event to trigger on the spawned thread, giving faster Start() calls. BUG=4413 R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/43699004 Cr-Commit-Position: refs/heads/master@{#8709} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8709 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -314,10 +314,9 @@ class AudioCodingModuleMtTest : public AudioCodingModuleTest {
|
||||
}
|
||||
|
||||
void StartThreads() {
|
||||
unsigned int thread_id = 0;
|
||||
ASSERT_TRUE(send_thread_->Start(thread_id));
|
||||
ASSERT_TRUE(insert_packet_thread_->Start(thread_id));
|
||||
ASSERT_TRUE(pull_audio_thread_->Start(thread_id));
|
||||
ASSERT_TRUE(send_thread_->Start());
|
||||
ASSERT_TRUE(insert_packet_thread_->Start());
|
||||
ASSERT_TRUE(pull_audio_thread_->Start());
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
|
||||
@ -446,10 +446,9 @@ class AudioCodingModuleMtTestOldApi : public AudioCodingModuleTestOldApi {
|
||||
}
|
||||
|
||||
void StartThreads() {
|
||||
unsigned int thread_id = 0;
|
||||
ASSERT_TRUE(send_thread_->Start(thread_id));
|
||||
ASSERT_TRUE(insert_packet_thread_->Start(thread_id));
|
||||
ASSERT_TRUE(pull_audio_thread_->Start(thread_id));
|
||||
ASSERT_TRUE(send_thread_->Start());
|
||||
ASSERT_TRUE(insert_packet_thread_->Start());
|
||||
ASSERT_TRUE(pull_audio_thread_->Start());
|
||||
}
|
||||
|
||||
void TearDown() {
|
||||
|
||||
@ -38,8 +38,7 @@ namespace webrtc {
|
||||
#define MAX_FILE_NAME_LENGTH_BYTE 500
|
||||
#define CHECK_THREAD_NULLITY(myThread, S) \
|
||||
if(myThread != NULL) { \
|
||||
unsigned int i; \
|
||||
(myThread)->Start(i); \
|
||||
(myThread)->Start(); \
|
||||
} else { \
|
||||
ADD_FAILURE() << S; \
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user