that implements a bunch of related ideas in this area:
https://github.com/eapache/channels
https://godoc.org/github.com/eapache/channels
It includes channels with "infinite" buffers channels with
finite-but-resizable buffers and a bunch of other useful types and
functions.
On Friday, February 3, 2012 2:32:28 PM UTC-5, Marcel wrote:
You can implement your own dynamic buffered channel with a slice and
use two channels to push and pop buffer values.
Like in this example "a channel" with a dynamic buffer:
http://play.golang.org/p/AiHBsxTFpj
The example could be extended to have a maximum buffer size and
multiple receivers.
It is probably also possible to hack something together where you
extend the channel type to get a result where you can use the dynamic
buffered channel as a normal channel.
--You can implement your own dynamic buffered channel with a slice and
use two channels to push and pop buffer values.
Like in this example "a channel" with a dynamic buffer:
http://play.golang.org/p/AiHBsxTFpj
The example could be extended to have a maximum buffer size and
multiple receivers.
It is probably also possible to hack something together where you
extend the channel type to get a result where you can use the dynamic
buffered channel as a normal channel.
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.