5 ms·
This misses the point of the article. It's short-sighted to say that he's reinvented CSP given that the entire concurrency model in Go is based around CSP, and
by m0meni 8y ago
This misses the point of the article. It's short-sighted to say that he's reinvented CSP given that the entire concurrency model in Go is based around CSP, and the author is already aware of it. The article is more related to RAII, scope, lifetimes, etc. than any model of concurrency.
- mpweiher 8y agoChannels are lifted from CSP, but PAR is obviously missing.
- zbobet2012 8y agopar is "select" effectively. While that isn't 100% the case, it is true.
- mpweiher 8y agoHuh? I thought "select" was "ALT"??
- kolpa 8y ago'go' is PAR with different syntax (Everything after the 'go' line is implicitly one branch of the PAR) 'select' is ALT
- zbobet2012 8y agoThat's correct apologies.
- mpweiher 8y agoHmmm...as far as I understood the FA, the point is exactly that 'go' is unlike PAR in important respects. 'go' is more like a goto, the new goroutine is spawned, without any scoping. PAR opens a scope where all the contained routines are executed in parallel, but all of these must have terminated before the statement after the PAR is executed. ?
- pdonis 8y ago> Everything after the 'go' line is implicitly one branch of the PAR No, it isn't, because Go doesn't do the italicized part: "Everything in a PAR block will run in parallel and all their outputs will be collected and fed as the input to the next SEQ."