I know if once get the data from a channel that data won't receive from any other place that channel is waiting. However, if I want to design a program broadcast that channel has got data and It is ready to take out in different places without affecting other channels but in all places, I need to receive data in the same order, what will be the best design?
As a example:
func sender(c chan int){
c-> 5
}
func reciever1(c chan int){
i:= <-c
...
}
func reciever2(c chan int){
i:= <-c
...
}
Here when executing both reciever1()
and reciver2()
Both should get same result.