Tag

CyclicBarrier

0 views collected around this technical thread.

Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 6, 2025 · Backend Development

Understanding Java CyclicBarrier with Practical Examples

This article explains Java's CyclicBarrier synchronization tool, compares it with CountDownLatch, demonstrates basic and array‑sum examples with reusable barriers and callback actions, and shows how it can coordinate multiple threads for tasks such as parallel computation and result aggregation.

ConcurrencyCyclicBarrierJava
0 likes · 6 min read
Understanding Java CyclicBarrier with Practical Examples
IT Services Circle
IT Services Circle
Jun 27, 2023 · Fundamentals

Using CyclicBarrier for Alternating Thread Printing of ABC in Java

This article explains how to use Java's CyclicBarrier to coordinate three threads that alternately print the characters A, B, and C, providing a detailed analysis, example analogy, complete implementation code, execution result, and a brief summary of its relevance in multithreading interviews.

ConcurrencyCyclicBarrierJava
0 likes · 5 min read
Using CyclicBarrier for Alternating Thread Printing of ABC in Java
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Apr 20, 2023 · Backend Development

Overview of Four Core Java Concurrency Utilities

This article introduces the four essential Java concurrency utilities—CountDownLatch, CyclicBarrier, Semaphore, and Exchanger—explaining their functions, underlying principles, typical usage patterns, and practical scenarios such as thread synchronization, resource limiting, and data exchange in multithreaded applications.

ConcurrencyCountDownLatchCyclicBarrier
0 likes · 7 min read
Overview of Four Core Java Concurrency Utilities
Selected Java Interview Questions
Selected Java Interview Questions
Sep 17, 2022 · Backend Development

Converting Asynchronous Calls to Synchronous in Java: Five Common Techniques

This article explains how to turn Java asynchronous invocations into synchronous ones by demonstrating five approaches—wait/notify, condition locks, Future, CountDownLatch, and CyclicBarrier—each illustrated with complete code examples and detailed execution flow.

CountDownLatchCyclicBarrierFuture
0 likes · 11 min read
Converting Asynchronous Calls to Synchronous in Java: Five Common Techniques
IT Services Circle
IT Services Circle
Apr 3, 2022 · Backend Development

Four Ways to Determine When a Java ThreadPool Has Completed All Tasks

This article explains four practical techniques—using isTerminated, comparing task counts, CountDownLatch, and CyclicBarrier—to reliably detect when a Java ThreadPoolExecutor has finished executing all submitted tasks, including code examples, advantages, disadvantages, and a summary of each method.

ConcurrencyCountDownLatchCyclicBarrier
0 likes · 12 min read
Four Ways to Determine When a Java ThreadPool Has Completed All Tasks
FunTester
FunTester
Dec 25, 2021 · Backend Development

Java Thread Synchronization Utilities: CountDownLatch, CyclicBarrier, and Phaser

An overview of Java’s three primary thread‑synchronization tools—CountDownLatch, CyclicBarrier, and Phaser—explaining their placement in java.util.concurrent, typical use‑cases such as coordinating multi‑threaded tasks in performance testing, and the advantages of each, complemented by illustrative diagrams.

ConcurrencyCountDownLatchCyclicBarrier
0 likes · 7 min read
Java Thread Synchronization Utilities: CountDownLatch, CyclicBarrier, and Phaser
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 1, 2021 · Backend Development

Understanding Java Concurrency Utilities: CyclicBarrier, CountDownLatch, Semaphore, and Exchanger

This article provides a comprehensive overview of Java's core concurrency utilities—CyclicBarrier, CountDownLatch, Semaphore, and Exchanger—explaining their purposes, internal mechanisms, constructors, usage patterns, and code examples to help developers master multithreaded programming.

ConcurrencyCountDownLatchCyclicBarrier
0 likes · 11 min read
Understanding Java Concurrency Utilities: CyclicBarrier, CountDownLatch, Semaphore, and Exchanger
政采云技术
政采云技术
Oct 22, 2021 · Fundamentals

Java Concurrency Tools: CountDownLatch, CyclicBarrier, and Semaphore

This article explains three Java concurrency tools - CountDownLatch, CyclicBarrier, and Semaphore - detailing their mechanisms, source code analysis, and practical usage scenarios with code examples.

AQSCountDownLatchCyclicBarrier
0 likes · 13 min read
Java Concurrency Tools: CountDownLatch, CyclicBarrier, and Semaphore
Top Architect
Top Architect
Aug 10, 2021 · Backend Development

Understanding Java Concurrency Utilities: CountDownLatch, CyclicBarrier, Semaphore, and Exchanger

This article explains four Java concurrency utilities—CountDownLatch, CyclicBarrier, Semaphore, and Exchanger—detailing their concepts, typical use cases, and providing complete code examples that demonstrate synchronization patterns such as thread coordination, resource limiting, and data exchange.

ConcurrencyCountDownLatchCyclicBarrier
0 likes · 13 min read
Understanding Java Concurrency Utilities: CountDownLatch, CyclicBarrier, Semaphore, and Exchanger
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 10, 2021 · Backend Development

Concurrent Unit Testing of AssetService.update with Optimization Techniques

This article explains how to write a concurrent unit test for the AssetService.update method using thread pools, CountDownLatch, AtomicInteger, and then suggests optimizations such as replacing AtomicInteger with LongAdder and employing CyclicBarrier to increase contention, providing full code examples and detailed explanations.

AtomicIntegerConcurrencyCyclicBarrier
0 likes · 9 min read
Concurrent Unit Testing of AssetService.update with Optimization Techniques
Top Architect
Top Architect
May 24, 2021 · Backend Development

Understanding CountDownLatch, CyclicBarrier, Semaphore, and Exchanger in Java

This article explains Java’s concurrency utilities CountDownLatch, CyclicBarrier, Semaphore, and Exchanger, illustrating their concepts with race‑style analogies, providing complete code examples, and showing execution results to demonstrate how threads can synchronize, wait, limit, and exchange data.

ConcurrencyCountDownLatchCyclicBarrier
0 likes · 12 min read
Understanding CountDownLatch, CyclicBarrier, Semaphore, and Exchanger in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 12, 2021 · Backend Development

Understanding Java CyclicBarrier: Usage, Implementation Details, and Comparison with CountDownLatch

This article explains the concept, practical usage, internal implementation, and key methods of Java's CyclicBarrier, compares it with CountDownLatch, and provides a complete code example demonstrating how multiple threads can repeatedly synchronize at a reusable barrier.

Backend DevelopmentConcurrencyCountDownLatch
0 likes · 8 min read
Understanding Java CyclicBarrier: Usage, Implementation Details, and Comparison with CountDownLatch