Semaphores in Software: Controlling Common Resources in Concurrent Programming

A semaphore is a powerful data type for controlling common resources in concurrenct programming. This article will help guide you into understanding what a semaphore is, how a semaphore works and when to use a semaphore so that you can practice safer programming.

This article will address:

  • What is a semaphore?
  • A real-world example of a semaphore
  • The concept of a counting semaphore (and when to use it)
  • The concept of a binary semaphore (and when to use it)

This article will use the Go language for code examples.

Was this article useful? Share it on Twitter!