Merge "Disallow shrinking threadpool size once started."
This commit is contained in:
commit
70f592a6cf
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue