thread switch & create thread