https://kotlinlang.org logo
#coroutines
Title
# coroutines
n

nimtiazm

02/25/2017, 10:04 AM
i fired up htop and noticed that when i execute the java program all CPUs’ hit 100% consumption while in kotlin programs they hit 91% or 95% and in between
e

elizarov

02/25/2017, 12:06 PM
That's how FJP.commonPool works by default. It uses n-1 threads. There is some system property to configure its parallelism. Or you can use newThreadPoolContext with Runtime.availableProcessors threads.
6 Views