Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Commit

Permalink
Workaround for iOS iSH Shell
Browse files Browse the repository at this point in the history
  • Loading branch information
w4123 committed Feb 17, 2021
1 parent 291b5e9 commit 459bd3a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/kotlin/org/itxtech/mirainative/MiraiNative.kt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ object MiraiNative : KotlinPlugin(

@OptIn(ObsoleteCoroutinesApi::class)
val eventDispatcher =
newFixedThreadPoolContext(Runtime.getRuntime().availableProcessors() * 2, "MiraiNative Events")
newFixedThreadPoolContext(when {
Runtime.getRuntime().availableProcessors() == 0 -> 4
else -> Runtime.getRuntime().availableProcessors()
} * 2, "MiraiNative Events")

var botOnline = false
val bot: Bot by lazy { Bot.instances.first() }
Expand Down

0 comments on commit 459bd3a

Please sign in to comment.