4 ms·
par is "select" effectively. While that isn't 100% the case, it is true.
by zbobet2012 8y ago
par 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."