Introduce a new constructor to PlatformThread.
The new constructor introduces two new changes:
* Support specifying thread priority at construction time.
- Moving forward, the SetPriority() method will be removed.
* New thread function type.
- The new type has 'void' as a return type and a polling loop
inside PlatformThread, is not used.
The old function type is still supported until all places have been moved over.
In this CL, the first steps towards deprecating the old mechanism are taken
by moving parts of the code that were simple to move, over to the new callback
type.
BUG=webrtc:7187
Review-Url: https://codereview.webrtc.org/2708723003
Cr-Commit-Position: refs/heads/master@{#16779}
diff --git a/webrtc/modules/video_coding/frame_buffer2_unittest.cc b/webrtc/modules/video_coding/frame_buffer2_unittest.cc
index c3d8ce7..b67d993 100644
--- a/webrtc/modules/video_coding/frame_buffer2_unittest.cc
+++ b/webrtc/modules/video_coding/frame_buffer2_unittest.cc
@@ -197,7 +197,7 @@
ASSERT_FALSE(frames_[index]);
}
- static bool ExtractLoop(void* obj) {
+ static void ExtractLoop(void* obj) {
TestFrameBuffer2* tfb = static_cast<TestFrameBuffer2*>(obj);
while (true) {
tfb->trigger_extract_event_.Wait(rtc::Event::kForever);
@@ -205,7 +205,7 @@
rtc::CritScope lock(&tfb->crit_);
tfb->crit_acquired_event_.Set();
if (tfb->tear_down_)
- return false;
+ return;
std::unique_ptr<FrameObject> frame;
FrameBuffer::ReturnReason res =