Tagged articles
LinkedBlockingQueue
11 articles · Page 1 of 1
The article explains why Java's ThreadPoolExecutor places tasks into its work queue before creating non‑core threads, describes the underlying JDK execution steps, shows how Tomcat customizes the queue to prioritize thread creation, and warns about misconfiguring unbounded queues that can cripple performance.
ConcurrencyJavaLinkedBlockingQueue
0 likes · 8 min read

This article describes how to build a lightweight custom object pool in Java using a LinkedBlockingQueue and a factory interface, detailing its design, implementation, code examples, and a test script that demonstrates borrowing, returning, and size control of pooled objects.
ConcurrencyFactory PatternLinkedBlockingQueue
0 likes · 7 min read

This article demonstrates how to merge multiple user‑info requests on the server side using a blocking queue, ScheduledThreadPoolExecutor, and CompletableFuture in Spring Boot, thereby consolidating SQL queries into a single batch call to save database connection resources while handling high concurrency.
CompletableFutureJava ConcurrencyLinkedBlockingQueue
0 likes · 13 min read

This article deep‑dives into the LinkedBlockingQueue.dequeue implementation, revealing why the line h.next = h is essential for helping the garbage collector, how cross‑generation references affect GC performance, and the role of weakly‑consistent iterators in Java's concurrent queue.
ConcurrencyJDKJava
0 likes · 15 min read

This article explains how LinkedBlockingQueue, normally thread‑safe, can enter an infinite loop when its stream traversal is used under JDK 8 with concurrent remove() calls, analyzes the root cause in the tryAdvance method, and shows how the bug was fixed in later JDK versions.
JDK8JavaLinkedBlockingQueue
0 likes · 15 min read

This article examines the MemoryLimitedLBQ and MemorySafeLBQ implementations, explains how they use memory‑limiting techniques to avoid Out‑Of‑Memory errors in unbounded LinkedBlockingQueue‑based thread pools, compares their designs, and shows practical code snippets for integrating them into Java projects.
JavaLinkedBlockingQueueMemoryManagement
0 likes · 13 min read

This article explores the design and implementation of MemoryLimitedLBQ and MemorySafeLBQ, two custom LinkedBlockingQueue variants that limit memory usage to avoid Out‑Of‑Memory errors in Java thread pools, comparing their mechanisms, instrumentation dependencies, and practical usage in open‑source projects.
ConcurrencyLinkedBlockingQueueinstrumentation
0 likes · 13 min read

This article presents a detailed performance evaluation of Java and Go high‑throughput message queues, focusing on LinkedBlockingQueue, exploring test scenarios based on message size and thread count, analyzing producer and consumer results, providing benchmark data, and sharing Groovy test cases for reproducibility.
ConcurrencyJavaLinkedBlockingQueue
0 likes · 27 min read

This article explains the different blocking queue implementations—ArrayBlockingQueue, LinkedBlockingQueue, SynchronousQueue, and PriorityBlockingQueue—used by Java thread pools, describing their structures, behavior, fairness settings, and performance characteristics for concurrent task execution.
ArrayBlockingQueueBackendBlockingQueue
0 likes · 6 min read

This article provides a comprehensive overview of Java's LinkedBlockingQueue, covering its FIFO behavior, internal linked‑list structure, concurrency controls with separate put and take locks, detailed method implementations, and a multithreaded example demonstrating safe usage versus non‑thread‑safe alternatives.
BlockingQueueConcurrencyDataStructure
0 likes · 14 min read

This article examines three Java concurrency implementations—CopyOnWriteArrayList, ConcurrentHashMap, and LinkedBlockingQueue—explaining their underlying principles, code structures, and how they achieve thread‑safe read/write operations using techniques such as copy‑on‑write, CAS, and separate locks.
CASConcurrentHashMapCopyOnWriteArrayList
0 likes · 13 min read
