4 ms·
Thank you for being a voice of sanity on this Chris. There seems to be a terrible amount of cargo culting around safe concurrent programming and the reinventio
by aardvark179 12y ago
Thank you for being a voice of sanity on this Chris.
There seems to be a terrible amount of cargo culting around safe concurrent programming and the reinvention of the wheel just because somebody heard the original wheel was bad (c.f. Processes and shared memory vs. threads), and the hope that CSP and similar schemes will act as a magik bullet.
In the end you need to think carefully about the design of your program, work out what races might occur, and try encapsulate any shared state mutation in as small an area as possible where it can be sensibly reasoned about. Remember that using concurrent data structures will not automatically make your code safe, put in comments saying why any shortcut you take is safe, and do really thorough code review.