What is the closest to ConcurrentHashMap and NavigableMap in Java?
Russel Winder
russel at winder.org.uk
Fri Nov 15 10:44:41 PST 2013
On Fri, 2013-11-15 at 18:55 +0100, Jacek Furmankiewicz wrote:
> Yes, that is what they say in Go...but it doesn't scale either.
> :-)
I don't follow. CSP scales very well and Go implements CSP. (Well an
updated version from Hoare's 1978 CSP.)
> I had the exact same discussion on the Go forums a while back and
> the conclusion was basically the same...roll your own maps with
> RW locks:
>
> https://groups.google.com/forum/?fromgroups#!searchin/golang-nuts/furmankiewicz/golang-nuts/jjjvXG4HdUw/ffWytKQ7X9YJ
>
> But...at the end someone actually built lock-free data structures
> in Go out of this:
>
> https://github.com/zond/gotomic
This is, of course, how ConcurrentHashMap arrived in Java, Java didn't
have a shared access, thread safe map so someone created it. Go has no
shared access, thread safe map and no-one has created one that is in the
standard library.
Of course Java is a shared-memory multithreading language whereas Go is
a CSP one, so the idea of a shared access memory safe data structure is
actually anathema.
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
More information about the Digitalmars-d-learn
mailing list