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

Commit ea103a9f authored by John Reck's avatar John Reck Committed by Android Git Automerger
Browse files

am 0ea996cf: am 62a65071: am dcf8837d: Merge "Restrict number of hwuiTask threads" into mnc-dr-dev

* commit '0ea996cf':
  Restrict number of hwuiTask threads
parents d4abc249 0ea996cf
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -33,7 +33,9 @@ TaskManager::TaskManager() {
    // Get the number of available CPUs. This value does not change over time.
    int cpuCount = sysconf(_SC_NPROCESSORS_CONF);

    int workerCount = MathUtils::max(1, cpuCount / 2);
    // Really no point in making more than 2 of these worker threads, but
    // we do want to limit ourselves to 1 worker thread on dual-core devices.
    int workerCount = cpuCount > 2 ? 2 : 1;
    for (int i = 0; i < workerCount; i++) {
        String8 name;
        name.appendFormat("hwuiTask%d", i + 1);