Translation for id implemented: join method for thread added to fix issue. (join() waits for the thread to die)