IT lexicon › Programming › Cyclic barrier

Cyclic barrier

Programming På svenska → Updated: 2026-11-16

Synchronization primitive that forces a fixed number of threads to meet at a point before any can proceed.

A cyclic barrier makes N threads wait until all N have reached a checkpoint, then releases them simultaneously. Unlike countdown latch, it resets automatically—the next batch of threads hitting the barrier will wait for N again. This makes it ideal for iterative parallel algorithms where each iteration must synchronize between workers, such as stencil computations or physics simulations. Threads call await() and block until the last thread arrives; then all wake at once.

Java shipped CyclicBarrier in 2004 as part of java.util.concurrent. The distinction from countdown latch is clean: countdown fires once, cyclic repeats.

← Back to the lexicon