Is there a description out there about what the memory backing of a buffered channel looks like? I.e., does
c := make(chan int, 10000)
allocate something similar to a [10000]int up front, or is there a more append-like behavior that allocates slices on demand? If the latter, can the buffer "shrink" again when not in use?
I ask this to decide between manually handling what might be a temporarily large buffer of objects (larger than ints), or let this just be handled by the channel itself.
Of course I can and should benchmark, but some background info would be nice anyway. :)
//jb
(Sent from my phone - please excuse brevity and typos.)
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.