private void notifyDestroyInstance(String instanceId) {
        Instance instance = instanceMap.get(instanceId);
        if (instance == null) {
            LOGGER.error("try to notify destroy instance but not found: taskId {} instanceId {}", taskId, instanceId);
            return;
        }
        instance.notifyDestroy();
    }
thread for core thread.

@return runnable profile.
inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/instance/InstanceManager.java