Threading Questions

Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Oct 5 14:02:56 PDT 2015


On 10/5/15 1:40 PM, bitwise wrote:
> On Monday, 5 October 2015 at 00:23:21 UTC, Jonathan M Davis wrote:
>> On Sunday, October 04, 2015 14:42:48 bitwise via Digitalmars-d-learn
>> wrote:
>>> Since D is moving towards a phobos with no GC, what will happen to
>>> things that are classes like Condition and Mutex?
>>
>> Phobos and druntime will always use the GC for some things, and some
>> things just plain need classes. Rather, we're trying to make it so
>> that Phobos does not use the GC when it doesn't need to use the GC as
>> well reduce how much the GC is required for stuff like string
>> processing where lazy ranges can be used instead in many cases.
>
> I was under the impression that the idea was to _completely_ eliminate
> the GC. It says in Andre's 2015H1 vision statement:
> "We aim to make the standard library usable in its entirety without a
> garbage collector."

No, the plan is to allow the user to choose how he wants to allocate. 
Many pieces of phobos make the assumption that the GC is fair game. I 
think the plan is to make those pieces instead allocate on the stack and 
provide a mechanism to move that allocation to the GC (Walter's Dconf 
talk was about this), or accept an allocator to use as a mechanism for 
allocating memory.

-Steve


More information about the Digitalmars-d-learn mailing list