I think I am missing how close and select work together.
I created two int channels a and b with buffer set to 3 and sent six
numbers in total there, channel a is closed then, b is left unclosed. Then
in a loop of ten cycles I read from channels.
No matter if I close a channel or not, channels keeps giving me "empty
value" (zero in case of integer). I would expect this behavior:
- if both a and b are not closed, select blocks
- if a is closed then it should print empty values from a
- the same for b
- if both are closed, default block is executed
Why select does not block?