Recoding KThread.join

Got a hang, need to debug code