Change bg Coroutine dispatchers to use single thread.

If in future we need to increase this then it will be explicit rather than a surprise with with the first 16 CPU device we encounter.

Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Presubmits
Change-Id: I44b71f1c3dde4ca349525630e5d758962dfb8ed9
This commit is contained in:
Uwais Ashraf committed 2025-05-30 11:40:36 -07:00
1 parent 829f57c522
commit 2834af0cdb
1 file changed
+2 -2
@@ -72,12 +72,12 @@ object ProductionDispatchers : DispatcherProvider {
override val ioBackground =
if (enableCoroutineThreadingImprovements())
bgDispatcher(nThreads = max(1, availableProcessors / 8), threadName = "LauncherBgIO")
bgDispatcher(nThreads = 1, threadName = "LauncherBgIO")
else singleBgThreadPool
override val lightweightBackground =
if (enableCoroutineThreadingImprovements())
bgDispatcher(nThreads = max(1, availableProcessors / 8), threadName = "LauncherBgLight")
bgDispatcher(nThreads = 1, threadName = "LauncherBgLight")
else singleBgThreadPool
override val unconfined = Dispatchers.Unconfined