Re: [go-nuts] Writing a non-blocking thread-safe buffer

2017-04-10 Thread Eno Compton
stre - New Orleans LA > > > > *From:* golan...@googlegroups.com [mailto: > golan...@googlegroups.com ] *On Behalf Of *Eno Compton > *Sent:* 2017 April 06, Thu 23:29 > *To:* golang-nuts > *Subject:* [go-nuts] Writing a non-blocking thread-safe buffer > > > > Hi All, > >

RE: [go-nuts] Writing a non-blocking thread-safe buffer

2017-04-07 Thread John Souvestre
LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Eno Compton Sent: 2017 April 06, Thu 23:29 To: golang-nuts Subject: [go-nuts] Writing a non-blocking thread-safe buffer Hi All, I'm trying to write a non-blocking thread-safe buffer for use in a

Re: [go-nuts] Writing a non-blocking thread-safe buffer

2017-04-07 Thread Michael Jones
I get about 3 million channel transfers per second on my computer. If each transfer is a single byte, that's 3 MB/sec. If transfers are pointers to buffers of a kilobyte, then that's 3 GB/sec...which is about as many bytes/sec as a CPU could possibly touch. If those buffers are 25kb then you're at

[go-nuts] Writing a non-blocking thread-safe buffer

2017-04-07 Thread Eno Compton
Hi All, I'm trying to write a non-blocking thread-safe buffer for use in a high throughput system. In short, I want to create a buffer that decouples the speed of writes from that of reads. For a first attempt, using channels in the implementation seems best. Here is a link