4 ms·
What is a semaphore? I wouldn't say you're an idiot if you don't know the answer, but we need people who can work with concurrency and a surprising number of d
by cameronh90 4y ago
What is a semaphore?
I wouldn't say you're an idiot if you don't know the answer, but we need people who can work with concurrency and a surprising number of developers haven't.
- whatshisface 4y agoYou don't usually use semaphores directly in modern programming languages. Go does everything with channels and Rust covers a lot of cases with static analysis, and has built-in high level concurrent primitives for the rest.
- jmrm 4y agoEven if it's not available (I haven't programmed in Go), I think most of programmers who run parallel code in Go know what is a semaphore or a mutex, don't you think?
- cameronh90 4y agoPerhaps so, but the synchronization primitives leak out eventually, e.g. while profiling or debugging. Semaphores also exist in other contexts, like POSIX/IPC, distributed semaphores etc. Even if you did manage to avoid them entirely, it would suggest a lack of curiosity if you've never looked into how concurrency is implemented beneath the surface.
- fffrantz 4y agoFunnily enough, coming from a telecommunications background, a semaphore will always make me think about Claude Chappe and his optical telegraph [1]. [1] https://en.wikipedia.org/wiki/Optical_telegraph https://en.wikipedia.org/wiki/Optical_telegraph