https://kotlinlang.org logo
#server
Title
h

Hawk

11/24/2017, 11:37 PM
@Ravi Hasija That is a
suspended
function, not a co-routine, suspended functions need to be called from within a co-routine. There are a few different ways to do that. Here is a simple example
Copy code
val job = launch(CommonPool) { 
    val result = scanProjects(args....)
    println("$result")
}
println("The result: ")
job.join() // join is a blocking call...