IT lexicon › Programming › Semaphore

Semaphore

Programming På svenska → Updated: 2026-05-24

Synchronisation primitive that allows N threads at once — a generalisation of a mutex (where N=1).

"Max 10 connections to the database at once" — semaphore with 10 tokens. Threads wait when all are taken. Classic in operating systems and network clients. Modern frameworks wrap this in pools.

← Back to the lexicon