Loading tv/tuner/aidl/default/Filter.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,11 @@ void FilterCallbackScheduler::start() { } void FilterCallbackScheduler::stop() { { std::unique_lock<std::mutex> lock(mLock); mIsRunning = false; mCv.notify_all(); } if (mCallbackThread.joinable()) { mCallbackThread.join(); } Loading @@ -113,6 +117,10 @@ void FilterCallbackScheduler::threadLoopOnce() { // okay to send data. mCv.wait(lock); } if (!mIsRunning) { lock.unlock(); return; } // condition_variable wait locks mutex on timeout / notify if (!mCallbackBuffer.empty()) { Loading Loading
tv/tuner/aidl/default/Filter.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,11 @@ void FilterCallbackScheduler::start() { } void FilterCallbackScheduler::stop() { { std::unique_lock<std::mutex> lock(mLock); mIsRunning = false; mCv.notify_all(); } if (mCallbackThread.joinable()) { mCallbackThread.join(); } Loading @@ -113,6 +117,10 @@ void FilterCallbackScheduler::threadLoopOnce() { // okay to send data. mCv.wait(lock); } if (!mIsRunning) { lock.unlock(); return; } // condition_variable wait locks mutex on timeout / notify if (!mCallbackBuffer.empty()) { Loading