thread switch when interrupted