The barbershop problem -- The little (Go) book of semaphores

Some months ago I announced a blog series that I call “The little (Go) book of semaphores”. I’ve continued posting in that series, about once a week, with a pause around the holidays (and a bit more, for personal reasons).

Today I published the most recent entry: The barbershop problem, which is a semaphores problem originally proposed by Dijsktra.

Writing the series I’ve found that some of the constraints in the classical problems have more to do with being able to implement a semaphore-based solution and less with a specific problem, so I’ve relaxed some of them when implementing them in Go if I think that this does not fundamentally change the problem. So far it’s been a fun exploration and I hope that it helps people coming from other languages to Go in making the transition smoother.

As always, feedback is welcomed!

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.