What is the closest to ConcurrentHashMap and NavigableMap in Java?

Russel Winder russel at winder.org.uk
Fri Nov 15 10:36:16 PST 2013


On Fri, 2013-11-15 at 19:05 +0100, ilya-stromberg wrote:
> On Friday, 15 November 2013 at 17:46:41 UTC, Russel Winder wrote:
> > If D programmers are being told to use locks in applications 
> > code, then
> > the D programming model and library are failing. Or the advice 
> > is
> > wrong ;-)
> 
> It's possible to implement lock-free data structures in D, you 
> can use core.atomic
> http://dlang.org/phobos/core_atomic.html
> 
> But it's REALLY difficult to implement and it can be SLOWER than 
> Mutex version (not only in D, it depends from usage situation).

I didn't intend to imply that core data structures had to be lock free,
it is clear that creators of thread and process safe data structures
should be free to use locks if it makes things faster and more
efficient. My point was about applications built on the language
platform: the platform should provide all the things needed so that
applications code never mention locks.
 
-- 
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