@Override
    default boolean offer(final E e) {
        if (Objects.isNull(getExecutor())) {
            throw new RejectedExecutionException("The task queue does not have executor!");
        }

        int currentPoolThreadSize = getExecutor().getPoolSize();
        // have free worker. put task into queue to let the worker deal with task.
        if (getExecutor().getActiveCount() < currentPoolThreadSize) {
            return doOffer(e);
        }

        // return false to let executor create new worker.
        if (currentPoolThreadSize < getExecutor().getMaximumPoolSize()) {
            return false;
        }

        // currentPoolThreadSize >= max
        return doOffer(e);
    }
set the executor.

@param executor executor
shenyu-common/src/main/java/org/apache/shenyu/common/concurrent/TaskQueue.java