SF doesn't need more than a few binder threads
Change-Id: Ic4659fb81f9990cc7caf84a496a8ae659a1d16a9
This commit is contained in:
parent
4a8111bc8c
commit
64a1e08b86
@ -21,5 +21,8 @@ using namespace android;
|
|||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
SurfaceFlinger::publishAndJoinThreadPool(true);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void publishAndJoinThreadPool(bool allowIsolated = false) {
|
static void publishAndJoinThreadPool(bool allowIsolated = false) {
|
||||||
sp<ProcessState> proc(ProcessState::self());
|
|
||||||
sp<IServiceManager> sm(defaultServiceManager());
|
sp<IServiceManager> sm(defaultServiceManager());
|
||||||
sm->addService(String16(SERVICE::getServiceName()), new SERVICE(), allowIsolated);
|
sm->addService(String16(SERVICE::getServiceName()), new SERVICE(), allowIsolated);
|
||||||
ProcessState::self()->startThreadPool();
|
ProcessState::self()->startThreadPool();
|
||||||
|
Loading…
Reference in New Issue
Block a user