INNER CODE UNIT · Java

run

apache/dubbo · dubbo-common/src/main/java/org/apache/dubbo/common/BatchExecutorQueue.java:53

    private void run(Executor executor) {
        try {
            Queue<T> snapshot = new LinkedList<>();
            T item;
            while ((item = queue.poll()) != null) {
                snapshot.add(item);
            }
            int i = 0;
            boolean flushedOnce = false;
            while ((item = snapshot.poll()) != null) {
                if (snapshot.size() == 0) {
                    flushedOnce = false;
                    break;
                }
                if (i == chunkSize) {
                    i = 0;
                    flush(item);
                    flushedOnce = true;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…