Andrew Gazelka
02/20/2019, 5:41 PMstreetsofboston
02/20/2019, 5:50 PMmain
? That one probably has id=0Andrew Gazelka
02/20/2019, 5:58 PMtest1()
though?streetsofboston
02/20/2019, 6:00 PMmain
calls test1()
, yes.Andrew Gazelka
02/20/2019, 6:00 PMfun main() {
test1()
}
streetsofboston
02/20/2019, 6:02 PMNick Aiello
02/20/2019, 6:05 PMthread {
println(Thread.currentThread().id)
println(Thread.currentThread().name)
}
Running in the REPL gives
21
Thread-8
Andrew Gazelka
02/20/2019, 6:07 PMDico
02/20/2019, 10:12 PMthread
will use a default ThreadFactory
which created it with that name