Is there any guarantee, that this code won’t crash with error?
I can’t find any proof in the specification of the fact that receives from unbuffered channel are ordered, however it seems to be true. I checkout out chan.go source code and it looks like receives that block are ordered, because they are placed in a linked list
recvq and taken from it in FIFO order.
Could someone help me out here?