Leave GC collection to the user of the D library?

Ali Çehreli acehreli at yahoo.com
Sun May 9 10:27:04 UTC 2021


On 5/9/21 12:59 AM, Ola Fosheim Grostad wrote:

 > On Sunday, 9 May 2021 at 03:25:06 UTC, Ali Çehreli wrote:
 >> The library starts the daemon with pipeProcess(); pipes are used for
 >> dispatching requests and shared memory is used for large data. This
 >> idea "worked like a charm." Phew!
 >
 > Why don't you do this in a manner that works with multiple threads?

That's what I want to do but those threads are created by the user, 
unknown to the D GC. Although there are ways of dealing with that 
case[1], I am questioning whether the library can disable GC and lets 
the user manage GC collections explicitly (cooperatively?).

Ali

[1] https://dlang.org/phobos/core_memory.html




More information about the Digitalmars-d mailing list