I am running this code ``` fun test1() { print...
# announcements
a
I am running this code
Copy code
fun test1() {
    println("1")
    printId()
    thread {
        println("2")
        printId()
        throw IllegalStateException("an exception")
    }.join()
    println("3")
}


fun printId(){
    println("Thread ID: $id")
}

val id get() = Thread.currentThread().id
and getting
Copy code
1
Thread ID: 1
2
Thread ID: 11
Exception in thread "Thread-0" java.lang.IllegalStateException: an exception
	at com.github.andrewgazelka.kotlintest.ThreadExceptionTestKt$test1$1.invoke(ThreadExceptionTest.kt:12)
	at com.github.andrewgazelka.kotlintest.ThreadExceptionTestKt$test1$1.invoke(ThreadExceptionTest.kt)
	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
3
why
Thread-0
?
s
Hi Andrew, did you figure it out?
NVM
a
yes @Systemkern look at the next comment