Latch

Noun · Development

Definitions

  1. A synchronization primitive that allows one or more threads to wait until a set of operations in other threads completes. Unlike a mutex, a latch is typically single-use — once its count reaches zero, it opens permanently. In hardware, a level-sensitive storage circuit that holds a single bit.

    In plain English: A one-time gate that keeps threads waiting until a countdown of tasks finishes, then lets them all through at once.

    Example: "The startup latch blocks the request handler threads until all caches are warmed and the health check passes."

Related Terms