mirror of
https://github.com/mamoe/mirai.git
synced 2025-04-09 02:10:10 +08:00
Give minimum value of 4 for
`availableProcessors` on Windows
This commit is contained in:
parent
ca8dad5ae7
commit
1b0a8cb2d5
@ -11,4 +11,6 @@ package net.mamoe.mirai.utils
|
||||
|
||||
import platform.windows.GetCurrentProcessorNumber
|
||||
|
||||
public actual fun availableProcessors(): Int = GetCurrentProcessorNumber().toInt()
|
||||
|
||||
public actual fun availableProcessors(): Int =
|
||||
GetCurrentProcessorNumber().toInt().coerceAtLeast(4) // somehow it worked on my machine but not on CI
|
Loading…
Reference in New Issue
Block a user