www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Proper concurrent nearly lock free efficient nogc storage structures?

reply Illuminati <Joe Masons.com> writes:
Does D have any such thing? I'm having to recreate the wheel here 
and it isn't fun ;/  Getting in the way of real work ;/

Surely you would think that with the power D has such things 
would exist by now?
Aug 26 2016
next sibling parent reply Cauterite <cauterite gmail.com> writes:
On Friday, 26 August 2016 at 23:38:02 UTC, Illuminati wrote:
 Does D have any such thing? I'm having to recreate the wheel 
 here and it isn't fun ;/  Getting in the way of real work ;/
nogc is such a new language feature that you can't expect a lot of support yet from e.g. the standard library. But in any case, Phobos is a very minimal library when it comes to data structures, for better or for worse. I personally hate to say it. However if you don't have your eye on Phobos, disregard my response, it was hard to tell from your question.
Aug 26 2016
parent reply Illuminati <Joe Masons.com> writes:
On Friday, 26 August 2016 at 23:44:53 UTC, Cauterite wrote:
 On Friday, 26 August 2016 at 23:38:02 UTC, Illuminati wrote:
 Does D have any such thing? I'm having to recreate the wheel 
 here and it isn't fun ;/  Getting in the way of real work ;/
nogc is such a new language feature that you can't expect a lot of support yet from e.g. the standard library. But in any case, Phobos is a very minimal library when it comes to data structures, for better or for worse. I personally hate to say it. However if you don't have your eye on Phobos, disregard my response, it was hard to tell from your question.
I would imagine after the addition of nogc that all the required plumbing would be next on the list? not having nogc containers is a real pain ;/ I've implemented a few but I find myself dreading each new container, not so much because it is difficult but because it is time consuming and takes away from real work I should be doing. Surely one of the many intelligent people on this forum should be able to implement some of the basic structures fairly quickly?
Aug 26 2016
parent Cauterite <cauterite gmail.com> writes:
On Saturday, 27 August 2016 at 01:06:53 UTC, Illuminati wrote:
 Surely one of the many intelligent people on this forum should 
 be able to implement some of the basic structures fairly 
 quickly?
Most of these people are happy to use the GC, so nogc structures are not a priority.
Aug 27 2016
prev sibling next sibling parent reply ZombineDev <petar.p.kirov gmail.com> writes:
On Friday, 26 August 2016 at 23:38:02 UTC, Illuminati wrote:
 Does D have any such thing? I'm having to recreate the wheel 
 here and it isn't fun ;/  Getting in the way of real work ;/

 Surely you would think that with the power D has such things 
 would exist by now?
Here's two popular libraries that implement nogc containers: http://code.dlang.org/packages/emsi_containers http://code.dlang.org/packages/memutils I don't know if in they have containers supporting concurrent lock-free operations, but still, it may be worth having a look.
Aug 27 2016
parent Illuminati <Joe Masons.com> writes:
On Saturday, 27 August 2016 at 13:12:42 UTC, ZombineDev wrote:
 On Friday, 26 August 2016 at 23:38:02 UTC, Illuminati wrote:
 Does D have any such thing? I'm having to recreate the wheel 
 here and it isn't fun ;/  Getting in the way of real work ;/

 Surely you would think that with the power D has such things 
 would exist by now?
Here's two popular libraries that implement nogc containers: http://code.dlang.org/packages/emsi_containers http://code.dlang.org/packages/memutils I don't know if in they have containers supporting concurrent lock-free operations, but still, it may be worth having a look.
Nope, neither. Kinda useless as you can't use single threaded in a multi-threaded environment. It's either all or nothing here and it seems there is nothing ;/
Aug 27 2016
prev sibling parent reply Dicebot <public dicebot.lv> writes:
On Friday, 26 August 2016 at 23:38:02 UTC, Illuminati wrote:
 Does D have any such thing? I'm having to recreate the wheel 
 here and it isn't fun ;/  Getting in the way of real work ;/

 Surely you would think that with the power D has such things 
 would exist by now?
There doesn't seem to be much demand for that as concurrency trend keeps moving from making shared access transparent to minimizing or even removing it completely. And for many remaining cases locking is acceptable and more simple. Thus I am not very surprised no one has bothered to work on lock-free data structures seriously so far.
Aug 27 2016
parent reply Illuminati <Joe Masons.com> writes:
On Saturday, 27 August 2016 at 17:27:19 UTC, Dicebot wrote:
 On Friday, 26 August 2016 at 23:38:02 UTC, Illuminati wrote:
 Does D have any such thing? I'm having to recreate the wheel 
 here and it isn't fun ;/  Getting in the way of real work ;/

 Surely you would think that with the power D has such things 
 would exist by now?
There doesn't seem to be much demand for that as concurrency trend keeps moving from making shared access transparent to minimizing or even removing it completely. And for many remaining cases locking is acceptable and more simple. Thus I am not very surprised no one has bothered to work on lock-free data structures seriously so far.
This is not a solution. D doesn't even seem to any have proper concurrent storage structures.
Aug 27 2016
parent Dicebot <public dicebot.lv> writes:
On Saturday, 27 August 2016 at 21:23:04 UTC, Illuminati wrote:
 On Saturday, 27 August 2016 at 17:27:19 UTC, Dicebot wrote:
 On Friday, 26 August 2016 at 23:38:02 UTC, Illuminati wrote:
 Does D have any such thing? I'm having to recreate the wheel 
 here and it isn't fun ;/  Getting in the way of real work ;/

 Surely you would think that with the power D has such things 
 would exist by now?
There doesn't seem to be much demand for that as concurrency trend keeps moving from making shared access transparent to minimizing or even removing it completely. And for many remaining cases locking is acceptable and more simple. Thus I am not very surprised no one has bothered to work on lock-free data structures seriously so far.
This is not a solution. D doesn't even seem to any have proper concurrent storage structures.
It is not a solution indeed, it is explanation why no one has considered writing one important so far (which you seemed to be surprised about in the first post). Same for concurrent data storage structures or anything else that implies "casual" concurrency - it is too rarely needed. I am afraid most likely you will need to write your own if this is a must :(
Aug 27 2016