Porting thread joining.