Thread.join not behaving as I expected in scala Thread.join not behaving as I expected in scala multithreading multithreading