IT lexicon › Programming › Monitor

Monitor

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

A classical abstraction for thread safety that encapsulates shared state with an implicit lock and condition variables.

Monitors were introduced by Per Brinch Hansen and Edsger Dijkstra in the 1970s as a high-level concept for managing concurrency. A monitor is a module or class whose code is all protected by an internal lock—only one thread can execute its methods at a time. Within the monitor are condition variables that let threads wait for specific conditions and wake each other. Java and many other languages build on the monitor concept (called "synchronized" in Java).

Monitors abstract away many lock complexities but can become bottlenecks in highly parallel systems compared to finer-grained locking mechanisms.

← Back to the lexicon