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

Commit 03a47ff0 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Disallow shrinking threadpool size once started." am: 70f592a6 am:...

Merge "Disallow shrinking threadpool size once started." am: 70f592a6 am: 9ee812fd am: 3cc36059

Change-Id: If7f3baba24492f70c3d1aebff78f2c9e999a34ab
parents 58d9b26b 3cc36059
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -328,6 +328,8 @@ void ProcessState::spawnPooledThread(bool isMain)
}

status_t ProcessState::setThreadPoolMaxThreadCount(size_t maxThreads) {
    LOG_ALWAYS_FATAL_IF(mThreadPoolStarted && maxThreads < mMaxThreads,
           "Binder threadpool cannot be shrunk after starting");
    status_t result = NO_ERROR;
    if (ioctl(mDriverFD, BINDER_SET_MAX_THREADS, &maxThreads) != -1) {
        mMaxThreads = maxThreads;