add a point of switching thread