private void dealWithAddActionQueue() {
        while (isRunnable()) {
            if (taskManager != null && taskManager.getInstanceNum() > globalInstanceLimit) {
                LOGGER.error("global instance num {} over limit {}", taskManager.getInstanceNum(), globalInstanceLimit);
                return;
            }
            if (instanceMap.size() > instanceLimit) {
                LOGGER.error("task {} instanceMap size {} over limit {}", taskId, instanceMap.size(), instanceLimit);
                return;
            }
            InstanceAction action = addActionQueue.poll();
            if (action == null) {
                break;
            }
            addInstance(action.getProfile());
        }
    }
thread for core thread.

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