pub unsafe extern "C" fn ABinderProcess_setThreadPoolMaxThreadCount(
numThreads: u32,
) -> bool
Expand description
This sets the maximum number of threads that can be started in the threadpool. By default, after startThreadPool is called, this is 15. If it is called additional times, it will only prevent the kernel from starting new threads and will not delete already existing threads. This should be called once before startThreadPool. The number of threads can never decrease.
This count refers to the number of threads that will be created lazily by the kernel, in addition to the single threads created by ABinderProcess_startThreadPool (+1) or ABinderProcess_joinThreadPool (+1). Note: ABinderProcess_startThreadPool starts a thread itself, but it also enables up to the number of threads passed to this function to start. This function does not start any threads itself; it only configures ABinderProcess_startThreadPool.
Do not use this from a library. Apps setup their own threadpools, and otherwise, the main function should be responsible for configuring the threadpool for the entire application.