|
if (select.recv && chan_recv(select.chan, recv_out) != 0) |
In the implementation of chan_select, it first checks every channel to see if it can recv/send. After that it randomly select one and do the recv/send.
What about if a channel can recv/send while checking but cannnot when really do it.
It seems the chan_select will block.
chan/src/chan.c
Line 407 in b4120ab
chan/src/chan.c
Line 444 in b4120ab
In the implementation of
chan_select, it first checks every channel to see if it can recv/send. After that it randomly select one and do the recv/send.What about if a channel can recv/send while checking but cannnot when really do it.
It seems the chan_select will block.