Move Wait() to jthread implementation