close thread, creating a new one.