3 ms·
I wasn't aware that there was widespread misunderstanding about what CSP is. Mind listing a common misconception, so I can tell I'm among the misinformed. I hav
by karmakaze 3y ago
I wasn't aware that there was widespread misunderstanding about what CSP is. Mind listing a common misconception, so I can tell I'm among the misinformed. I haven't read up on it specifically so the links in these threads are now on my radar. As much as I know is through running into the ideas from Erlang/Elixir and Pony. The only other thing I recall reading is as soon as there's a buffer, CSP breaks down losing determinism or some-such.
I also ran into the Inmos Transputer while I was at UWaterloo but didn't get a chance to use it myself, due to limited availability at the time.
- JonChesterfield 3y agoLots of people have the idea that message passing is good. Maybe slow, but easier than directly hammering on shared memory. Synchronous message passing, as in wait for the other guy then swap, is a different thing to pushing work into a queue to be dealt with later. Not just a buffer of size one; the current thread actually blocks until the exchange occurs. It's another step in the direction of decreased throughput for decreased entropy and I think it's an important one. I personally missed the distinction for a good decade or so, seems plausible others have likewise missed it.
- BoiledCabbage 3y agoAnd between CSP and elixir, which promotes synchronous message passing and which promotes the asynchronous/queue approach?
- Jtsummers 3y agoCSP communication blocks until both sides are ready for the communication. You can create a process which acts as a buffer so that an outputting process is able to communicate so long as the buffer has capacity (and if the buffer size is unbounded then it will never be blocked, at least as long as there is sufficient memory).