def notify_thread_not_alive(self, thread_id, use_lock=True):
        """ if thread is not alive, cancel trace_dispatch processing """
        if self.writer is None:
            return

        with self._lock_running_thread_ids if use_lock else NULL:
            thread = self._running_thread_ids.pop(thread_id, None)
            if thread is None:
                return

            was_notified = thread.additional_info.pydev_notify_kill
            if not was_notified:
                thread.additional_info.pydev_notify_kill = True

        self.writer.add_command(self.cmd_factory.make_thread_killed_message(thread_id))
 if thread is not alive, cancel trace_dispatch processing 
debugger/src/pydevd.py