val result = AtomicInteger() val jobs = Array(15000) { launch { result.getAndIncrement() } } joinAll(*jobs) println(result.get())