3 ms·
Usually IO read (or writes) should only be handled by a single goroutine at the same time. I don't think that the Read() function provides concurrent access gua
by zimbatm 10y ago
Usually IO read (or writes) should only be handled by a single goroutine at the same time. I don't think that the Read() function provides concurrent access guarantees either.
But you're right that myIO.ReadReady doesn't give the guarantee that there is enough data to fill the len(buf) on the next Read call, which would make it then blocking.