exit thread after sending signal