Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 489246b7 authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge "libbinder: double cost for incorrect wait config" am: 58def21d am:...

Merge "libbinder: double cost for incorrect wait config" am: 58def21d am: 834ba711 am: 3bb10a74

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2439140



Change-Id: I0e19669c619fa29801110d24bdf5e62d9ad14230
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents bc7cee58 3bb10a74
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -412,13 +412,11 @@ sp<IBinder> ServiceManagerShim::waitForService(const String16& name16)
            // command, so we hang indefinitely.
            std::unique_lock<std::mutex> lock(waiter->mMutex);
            using std::literals::chrono_literals::operator""s;
            waiter->mCv.wait_for(lock, 1s, [&] {
                return waiter->mBinder != nullptr;
            });
            waiter->mCv.wait_for(lock, 2s, [&] { return waiter->mBinder != nullptr; });
            if (waiter->mBinder != nullptr) return waiter->mBinder;
        }

        ALOGW("Waited one second for %s (is service started? Number of threads started in the "
        ALOGW("Waited two seconds for %s (is service started? Number of threads started in the "
              "threadpool: %zu. Are binder threads started and available?)",
              name.c_str(), ProcessState::self()->getThreadPoolMaxTotalThreadCount());