dealing with canceled thread in join