Stop using thread pools

This commit is contained in:
Mygod
2021-11-26 23:05:25 -05:00
parent de3226e27a
commit 1cf961b23c
4 changed files with 5 additions and 10 deletions

View File

@@ -404,7 +404,7 @@ class RootServer {
mainInitialized.await()
CoroutineScope(Dispatchers.Main.immediate + job)
}
val callbackWorker = newSingleThreadContext("callbackWorker")
val callbackWorker = Dispatchers.IO.limitedParallelism(1)
// access to cancellables shall be wrapped in defaultWorker
val cancellables = LongSparseArray<() -> Unit>()