5 ms·
I believe you have a race in that code on error channel. You can't guarantee that the value you send on it will be received by correct receiver. If you have 2
by cronos 13y ago
I believe you have a race in that code on error channel. You can't guarantee that the value you send on it will be received by correct receiver.
If you have 2 concurrent transfers and one errors and the other succeds, second one may receive an error intended for the first one.
- zeeboo 13y agoSince the channels are unbuffered, theres no way to read from the error channel until the loop has accepted your request for the transaction. Also, since it won't accept another transaction request until it has sent an error (it always sends an error value), you always read the error for your transaction. Any buffering in the request channels would have the race you've described though.