https://kotlinlang.org logo
Title
e

Exerosis

05/26/2022, 8:29 PM
coroutineScope {
    println("Entered scope")
    launch {
        println("why not??: ${Thread.currentThread().name}")
    }
}
How can I debug this printing nothing at all? I do have a non standard CorountineContext: https://srcb.in/y7TGICTNxq However, it seems to work with everything else so I'm not sure what I'm doing wrong here.
r

Richard Gomez

05/26/2022, 9:40 PM
Is the
println
never happening or the printing no thread name?
e

Exerosis

05/27/2022, 12:24 AM
Neither one of the
println
output anything.
p

Pavel

05/27/2022, 5:02 AM
You probably finish your program (terminate) before launch executes? Can you call join() on the returned Job?
e

Exerosis

05/29/2022, 5:03 AM
my main goes like:
fun main() = runBlocking {
  ...
  delay(1.days)
}
So I'm sure I'm not exiting early.
Ah I see the issue was that my minusKey was calling plus and plus seems to use fold and minusKey to move the interceptor to the front of the chain.