channels icon indicating copy to clipboard operation
channels copied to clipboard

Cannot resize to buffer capacity of None

Open eapache opened this issue 11 years ago • 0 comments

Because there's a goroutine in the middle, the current ResizableChannel can't be resized to a capacity of None (for fully unbuffered blocking mode). The best it can do is a buffer of size 1.

I played around with a structure that returns different backing channels from In() and Out() depending on the current buffer size, but it turned out to be hard (potentially impossible) to preserve the order of elements coming out of the output channel(s) correctly.

It may be that this problem is just impossible, but leaving the ticket for documentation and in case anyone has a brilliant idea in this regard.

eapache avatar Nov 15 '13 02:11 eapache