Hacker News new | ask | show | jobs
by ptero 3212 days ago
Semaphore is a tool. Like any tool, to use it well you need to apply it correctly and know of its limitations (e.g., what are the guarantees it requires) and your environment (e.g., what the OS / library provides).

IMO the problems in actual software are almost always between the keyboard and the chair; one can write junk using any sync primitives. My 2c.

1 comments

I never understood what use a semaphore was until I tried my hand at implementing go like channels in swift. It's a very strange primitive that I don't think many people understand when it should be used.