IT lexicon › Programming › Barrier

Barrier

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

A synchronization point where multiple threads must meet — no thread proceeds until all have arrived.

Common in parallel computing: a pool of worker threads divides a problem, solves its piece, calls barrier.wait(), and waits for the rest. Once all arrive, execution continues. A barrier is less granular than semaphores — it requires an exact number of threads (or all of them) to arrive. Most implementations are reusable and can be reset.

Barriers are prone to performance cliffs: one slow thread arriving late blocks all others. In load-balancing systems, work stealing and dynamic task subdivision try to avoid this.

← Back to the lexicon