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

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

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

am: b1edc48d

Change-Id: I251c7b72196f8996051b538a59fd466b65757ce4
parents b78aad82 b1edc48d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -84,6 +84,11 @@ static status_t notifyMediaScanner(const char* fileName) {

int main(int argc, char** argv)
{
    // 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().
    // See b/36066697 for rationale
    ProcessState::self()->setThreadPoolMaxThreadCount(0);
    ProcessState::self()->startThreadPool();

    const char* pname = argv[0];