newFixedThreadPool(Runtime.getRuntime().availableProcessors())

This commit is contained in:
2dust
2024-11-09 19:38:59 +08:00
parent 96e66da071
commit 25c42c475f

View File

@@ -24,7 +24,7 @@ import libv2ray.Libv2ray
import java.util.concurrent.Executors
class V2RayTestService : Service() {
private val realTestScope by lazy { CoroutineScope(Executors.newFixedThreadPool(2).asCoroutineDispatcher()) }
private val realTestScope by lazy { CoroutineScope(Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()).asCoroutineDispatcher()) }
override fun onCreate() {
super.onCreate()