Go have useful concurrent model with goroutines. It is easy to create concurrent algorithm, but there are no cocurrent lock-free data structures. Maybe it is a good idea to create standart libraries with this data structures.
P.S. Are there any libraries with concurrent lock-free data structures?
Go have useful concurrent model with goroutines. It is easy to create concurrent algorithm, but there are no cocurrent lock-free data structures. Maybe it is a good idea to create standart libraries with this data structures.P.S. Are there any libraries with concurrent lock-free data structures?
A selection of these would be nice as 3rd party packages. But they have their own set of trade offs and do not eliminate the need for coordination across goroutines. So far I've been successful using core data structures with channels in my public API, and the sync and sort packages for efficiency and implementation coordination.
I agree. Many of the common examples of Go’s concurrency (using channels and/or mutexes) don’t scale well enough for use in a 64+ core environment. As such machines become common I’m hoping that there will be some standard library offerings.
Meanwhile, yes – there are some third-party libraries.
John
John Souvestre - New Orleans LA
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ø This is not Go's philosophy. The Go team has repeatedly said things like:
I would disagree. I believe that they have said they didn’t see the need for lock-free data structures quite yet. Indeed, if you wanted to keep things simple and have only one type then having lock-free would be better than having locking. J
John
John Souvestre - New Orleans LA
From: golan...@googlegroups.com [mailto:golan...@googlegroups.com] On Behalf Of Shawn Milochik
Sent: 2016 April 18, Mon 10:30
To: golang-nuts
Subject: Re: [go-nuts] Concurrent data structures in golang.
On Mon, Apr 18, 2016 at 4:15 AM, Vlad Gruchik <gruch...@gmail.com> wrote:
Go have useful concurrent model with goroutines. It is easy to create concurrent algorithm, but there are no cocurrent lock-free data structures. Maybe it is a good idea to create standart libraries with this data structures.
P.S. Are there any libraries with concurrent lock-free data structures?
This is not Go's philosophy. The Go team has repeatedly said things like:
"Less is exponentially more": http://commandcenter.blogspot.com/2012/06/less-is-exponentially-more.html
"Do less. Enable more." https://www.youtube.com/watch?v=XvZOdpd_9tc
It is invariably people new to Go who experience the initial "Wow, this is awesome!" followed immediately by "Wait, why isn't that done for me in Go?" Please allow yourself the time to experience the language and its subtle beauty before you go trying to change it or resort to third-party libraries created by misguided people who were too impatient to understand Go.
There is no instant gratification. But there is more gratification lying under the surface than you can imagine right now.
--
P.S.
Meanwhile, in addition to what’s already in sync/atomic, it would be nice to have CAS2/DCAS. I believe that this would make implementing lock-free easier in many cases.
John
John Souvestre - New Orleans LA
From: John Souvestre [mailto:Jo...@Souvestre.com]
Sent: 2016 April 18, Mon 11:34
To: golan...@googlegroups.com
Subject: RE: [go-nuts] Concurrent data structures in golang.
I agree. Many of the common examples of Go’s concurrency (using channels and/or mutexes) don’t scale well enough for use in a 64+ core environment. As such machines become common I’m hoping that there will be some standard library offerings.
Meanwhile, yes – there are some third-party libraries.
John
John Souvestre - New Orleans LA
Sent: 2016 April 18, Mon 06:15
To: golang-nuts
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/5ZJjTrDZCaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
There are plenty of examples in the literature of systems using locking which top out from 8 to 16 cores.
Check Dmitry’s site for lots of good info: www.1024cores.net
John
John Souvestre - New Orleans LA