limit parallelism

This commit is contained in:
Martin Ptáček
2023-07-25 23:29:01 +02:00
parent b7a4cb9385
commit f9da04fbf9

View File

@ -64,8 +64,8 @@ class PromWorker(
@OptIn(DelicateCoroutinesApi::class, ExperimentalCoroutinesApi::class)
private suspend fun startServicesInOneThread(config: PromConfiguration) {
val backgroundDispatcher = newFixedThreadPoolContext(2, "Prom worker")
val threadContext = backgroundDispatcher.limitedParallelism(2)
val backgroundDispatcher = newFixedThreadPoolContext(1, "Prom worker")
val threadContext = backgroundDispatcher.limitedParallelism(1)
try{
withContext(threadContext) {