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

Commit e19f2930 authored by Martijn Coenen's avatar Martijn Coenen Committed by android-build-merger
Browse files

Merge "Only spawn one binder thread for cmd." into oc-dev

am: 31d8ab2e

Change-Id: I2cc1e090bb1669bc7ed181c5e3ae65d5b35f77e5
parents 49cab390 31d8ab2e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -123,6 +123,13 @@ int main(int argc, char* const argv[])
{
    signal(SIGPIPE, SIG_IGN);
    sp<ProcessState> proc = ProcessState::self();
    // setThreadPoolMaxThreadCount(0) actually tells the kernel it's
    // not allowed to spawn any additional threads, but we still spawn
    // a binder thread from userspace when we call startThreadPool().
    // This is safe because we only have 2 callbacks, neither of which
    // block.
    // See b/36066697 for rationale
    proc->setThreadPoolMaxThreadCount(0);
    proc->startThreadPool();

    sp<IServiceManager> sm = defaultServiceManager();