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

Javier

04/02/2020, 8:16 PM
Is it possible to test coroutines with parallel execution?
c

Casey Brooks

04/02/2020, 9:00 PM
Sure, you can launch async jobs and join them within a
runBlocking
block.
Copy code
fun test() = runBlocking {
    val job = GlobalScope.launch {
        delay(2500)
    }

    job.join()
}
j

Javier

04/02/2020, 9:05 PM
Really I am trying to ron every test in parallel
2 Views