exit_thread: accept a task parameter to be exited