I'm experimenting with [Kotlin Coroutines](https://kotlinlang.org/docs/reference/coroutines.html) and have following code:

```
fun main(args: Array<String>) = runBlocking {
    val cores = Runtime.getRuntime().availableProcessors()
    println("number of cores: $cores")

    val jobs = List(10) {
        async(CommonPool) {
            delay(100)
            println("async #$it on thread ${Thread.currentThread().name}")
        }
    }
    jobs.forEach { it.join() }
}

```

This is my output:

```
number of cores: 4
async number:0 on thread ForkJoinPool.commonPool-worker-2
async number:2 on thread ForkJoinPool.commonPool-worker-3
async number:3 on thread ForkJoinPool.commonPool-worker-3
async number:4 on thread ForkJoinPool.commonPool-worker-3
async number:5 on thread ForkJoinPool.commonPool-worker-3
async number:1 on thread ForkJoinPool.commonPool-worker-1
async number:7 on thread ForkJoinPool.commonPool-worker-3
async number:6 on thread ForkJoinPool.commonPool-worker-2
async number:9 on thread ForkJoinPool.commonPool-worker-3
async number:8 on thread ForkJoinPool.commonPool-worker-1

```

According to Roman Elizarov's [answer](https://stackoverflow.com/a/43232925/3734457) to another coroutines related question:

> 
> "The launch just creates new coroutine, while CommonPool dispatches
>  coroutines to a ForkJoinPool.commonPool() which does use multiple
>  threads and thus executes on multiple CPUs in this example."
> 
> 
> 

According to Java 8 [documentation](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ForkJoinPool.html):

> 
> "For applications that require separate or custom pools, a
>  ForkJoinPool may be constructed with a given target parallelism level;
>  by default, equal to the number of available processors."
> 
> 
> 

**Why there are only 3 worker threads being used?** There are the same 3 worker threads even when I increase number of async tasks to 1000+.

My configuration:
Mac/High Sierra with dual core cpu (with [Hyper-threading](https://en.wikipedia.org/wiki/Hyper-threading), thus 4 visible cores), Kotlin 1.2, kotlinx-coroutines-core:0.19.3 and JVM 1.8