private void dealWithActionQueue(BlockingQueue<TaskAction> queue) {
        while (isRunnable()) {
            try {
                TaskAction action = queue.poll();
                if (action == null) {
                    break;
                }
                TaskProfile profile = action.getProfile();
                switch (action.getActionType()) {
                    case FINISH:
                        LOGGER.info("deal finish action, taskId {}", profile.getTaskId());
                        finishTask(profile);
                        break;
                    default:
                        LOGGER.error("invalid action type for action queue: taskId {} type {}", profile.getTaskId(),
                                action.getActionType());
                }
            } catch (Throwable ex) {
                LOGGER.error("dealWithActionQueue", ex);
                ThreadUtils.threadThrowableHandler(Thread.currentThread(), ex);
            }
        }
    }
thread for core thread.

@return runnable profile.
inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/task/TaskManager.java