Do buffered channels maintain order?
问题 In Go, do buffered channels have any order guarantee? For example: you have two goroutines A & B that share a channel. A pushes data onto the channel while B reads from it. Are you guranted that B will read data In the same order that A put it into the channel? I understand that if there are multiple producers or consumers the order may be non-deterministic, but I'm specifically asking about having just 1 producer and 1 consumer. 回答1: You can see the idea of channel illustrated in "The Nature