SF doesn't need more than a few binder threads

Change-Id: Ic4659fb81f9990cc7caf84a496a8ae659a1d16a9
This commit is contained in:
Mathias Agopian 2012-04-19 17:31:53 -07:00
parent 4a8111bc8c
commit 64a1e08b86
2 changed files with 3 additions and 1 deletions

View File

@ -21,5 +21,8 @@ using namespace android;
int main(int argc, char** argv) {
SurfaceFlinger::publishAndJoinThreadPool(true);
// When SF is launched in its own process, limit the number of
// binder threads to 4.
ProcessState::self()->setThreadPoolMaxThreadCount(4);
return 0;
}

View File

@ -40,7 +40,6 @@ public:
}
static void publishAndJoinThreadPool(bool allowIsolated = false) {
sp<ProcessState> proc(ProcessState::self());
sp<IServiceManager> sm(defaultServiceManager());
sm->addService(String16(SERVICE::getServiceName()), new SERVICE(), allowIsolated);
ProcessState::self()->startThreadPool();