Rename thread_joint to thread_wait