Open
Description
Certain comments in the sequencing pattern imply Joe's goroutine will generate the first received Message struct followed by Ann's:
concurrency-patterns/4-multiplexing/sequencing/sequencing.go
Lines 35 to 42 in c04c593
However, the code doesn't explicitly define a Happens Before dependency to ensure this ordering. Therefore, it's possible that Ann's Message struct will precede Joe's resulting in the variable msg1 containing Ann's message, not Joe's as suggested by the comments.
If a strict Round-robin ordering is desired, the following implementation delivers the same outcome while eliminating the wait abstraction and its associated code.
Metadata
Metadata
Assignees
Labels
No labels