Code: Select all
Thread 1:
chan <: byte;
chan :> byte;
Thread 2:
chan <: byte;
chan :> byte.
I am not intentionally doing this, but I have different threads of different speeds, and I think it may be possible for this situation to arise.
If Thread 1 completes early, and tries to send data to Thread 2, the statement will block. However, Thread 2 completes a bit later, and as a result, both ends have sent data on the channel.