David Cuesta
03/11/2019, 5:56 PMGlobalScope.launch {
CoroutineScope(a.context).launch {
val b = c.await()
store(b)
println("Hello")
}.join()
} where a is an object which contains a Coroutine context and c is a deferred value obtained from a calling a suspend function. It never prints Hello because there is a NullPointerException when tries to store a. Anyone knows why is it happening?? My target is to wait until the deferred value a is completed and then store it using the store function, which is not a suspend function.LeoColman
03/11/2019, 6:04 PMrunBlocking?LeoColman
03/11/2019, 6:04 PMasync await?David Cuesta
03/11/2019, 6:10 PMLeoColman
03/11/2019, 6:49 PMDavid Cuesta
03/11/2019, 6:53 PMLeoColman
03/11/2019, 6:54 PMDavid Cuesta
03/11/2019, 7:05 PMDavid Cuesta
03/11/2019, 7:05 PMDavid Cuesta
03/11/2019, 7:05 PMgildor
03/11/2019, 11:24 PMDico
03/12/2019, 6:27 AMawait is throwing the npe and you're gonna need to find the code of that coroutine from the stacktrace.