digitalmars.D - A better way to check if the gc is running
- bogdan (8/8) Dec 12 2019 Hi,
- Petar Kirov [ZombineDev] (5/13) Dec 12 2019 I agree that this is a good idea. It shouldn't be hard to
- Jacob Carlborg (6/9) Dec 14 2019 In Tango for D1, Object has an additional method, `dispose`, which is
- Steven Schveighoffer (4/19) Dec 15 2019 https://issues.dlang.org/show_bug.cgi?id=17563
- Bogdan Szabo (4/25) Dec 16 2019 This looks like an old issue, maybe we won't have this very
- rikki cattermole (3/28) Dec 16 2019 Only if it requires language changes (like adding a parameter to the
- Steven Schveighoffer (3/27) Dec 16 2019 No. It's completely a library change, and backwards compatible.
- Petar Kirov [ZombineDev] (4/7) Dec 16 2019 Elapsed time is not always a good indication of the complexity or
- Petar Kirov [ZombineDev] (4/12) Dec 16 2019 P.S. Thanks for reminding me of this issue Bogdan, sometimes
- Bogdan Szabo (4/20) Dec 17 2019 This is awesome!
- Guillaume Piolat (2/24) Dec 17 2019 +1 thanks a lot!
Hi, When combining ref counting and GC allocated classes, weird bugs might happen. Is it possible to add a new member in `core.memory.GC`, like `isCollecting` or `isRunning`, to avoid testing if the GC is running, without allocating like this? https://p0nce.github.io/d-idioms/#GC-proof-resource-class Thanks, Bogdan
Dec 12 2019
On Thursday, 12 December 2019 at 08:56:37 UTC, bogdan wrote:Hi, When combining ref counting and GC allocated classes, weird bugs might happen. Is it possible to add a new member in `core.memory.GC`, like `isCollecting` or `isRunning`, to avoid testing if the GC is running, without allocating like this? https://p0nce.github.io/d-idioms/#GC-proof-resource-class Thanks, BogdanI agree that this is a good idea. It shouldn't be hard to implement as the GC implementation already has this information available, so it's just a matter of exposing it through the layers.
Dec 12 2019
On 2019-12-12 10:00, Petar Kirov [ZombineDev] wrote:I agree that this is a good idea. It shouldn't be hard to implement as the GC implementation already has this information available, so it's just a matter of exposing it through the layers.In Tango for D1, Object has an additional method, `dispose`, which is called by explicit `delete` or when the scope exists and the class variable is declared `scope`. -- /Jacob Carlborg
Dec 14 2019
On Thursday, 12 December 2019 at 09:00:38 UTC, Petar Kirov [ZombineDev] wrote:On Thursday, 12 December 2019 at 08:56:37 UTC, bogdan wrote:https://issues.dlang.org/show_bug.cgi?id=17563 -SteveHi, When combining ref counting and GC allocated classes, weird bugs might happen. Is it possible to add a new member in `core.memory.GC`, like `isCollecting` or `isRunning`, to avoid testing if the GC is running, without allocating like this? https://p0nce.github.io/d-idioms/#GC-proof-resource-classI agree that this is a good idea. It shouldn't be hard to implement as the GC implementation already has this information available, so it's just a matter of exposing it through the layers.
Dec 15 2019
On Sunday, 15 December 2019 at 22:33:58 UTC, Steven Schveighoffer wrote:On Thursday, 12 December 2019 at 09:00:38 UTC, Petar Kirov [ZombineDev] wrote:This looks like an old issue, maybe we won't have this very soon... Is a DIP necessary for such changes?On Thursday, 12 December 2019 at 08:56:37 UTC, bogdan wrote:https://issues.dlang.org/show_bug.cgi?id=17563 -SteveHi, When combining ref counting and GC allocated classes, weird bugs might happen. Is it possible to add a new member in `core.memory.GC`, like `isCollecting` or `isRunning`, to avoid testing if the GC is running, without allocating like this? https://p0nce.github.io/d-idioms/#GC-proof-resource-classI agree that this is a good idea. It shouldn't be hard to implement as the GC implementation already has this information available, so it's just a matter of exposing it through the layers.
Dec 16 2019
On 17/12/2019 2:23 AM, Bogdan Szabo wrote:On Sunday, 15 December 2019 at 22:33:58 UTC, Steven Schveighoffer wrote:Only if it requires language changes (like adding a parameter to the destructor).On Thursday, 12 December 2019 at 09:00:38 UTC, Petar Kirov [ZombineDev] wrote:This looks like an old issue, maybe we won't have this very soon... Is a DIP necessary for such changes?On Thursday, 12 December 2019 at 08:56:37 UTC, bogdan wrote:https://issues.dlang.org/show_bug.cgi?id=17563 -SteveHi, When combining ref counting and GC allocated classes, weird bugs might happen. Is it possible to add a new member in `core.memory.GC`, like `isCollecting` or `isRunning`, to avoid testing if the GC is running, without allocating like this? https://p0nce.github.io/d-idioms/#GC-proof-resource-classI agree that this is a good idea. It shouldn't be hard to implement as the GC implementation already has this information available, so it's just a matter of exposing it through the layers.
Dec 16 2019
On 12/16/19 8:23 AM, Bogdan Szabo wrote:On Sunday, 15 December 2019 at 22:33:58 UTC, Steven Schveighoffer wrote:No. It's completely a library change, and backwards compatible. -SteveOn Thursday, 12 December 2019 at 09:00:38 UTC, Petar Kirov [ZombineDev] wrote:This looks like an old issue, maybe we won't have this very soon... Is a DIP necessary for such changes?On Thursday, 12 December 2019 at 08:56:37 UTC, bogdan wrote:https://issues.dlang.org/show_bug.cgi?id=17563Hi, When combining ref counting and GC allocated classes, weird bugs might happen. Is it possible to add a new member in `core.memory.GC`, like `isCollecting` or `isRunning`, to avoid testing if the GC is running, without allocating like this? https://p0nce.github.io/d-idioms/#GC-proof-resource-classI agree that this is a good idea. It shouldn't be hard to implement as the GC implementation already has this information available, so it's just a matter of exposing it through the layers.
Dec 16 2019
On Monday, 16 December 2019 at 13:23:56 UTC, Bogdan Szabo wrote:[..] This looks like an old issue, maybe we won't have this very soon... Is a DIP necessary for such changes?Elapsed time is not always a good indication of the complexity or feasibility of a task, especially in open-source ;) https://github.com/dlang/druntime/pull/2873
Dec 16 2019
On Monday, 16 December 2019 at 23:36:21 UTC, Petar Kirov [ZombineDev] wrote:On Monday, 16 December 2019 at 13:23:56 UTC, Bogdan Szabo wrote:P.S. Thanks for reminding me of this issue Bogdan, sometimes communication is all that's necessary :)[..] This looks like an old issue, maybe we won't have this very soon... Is a DIP necessary for such changes?Elapsed time is not always a good indication of the complexity or feasibility of a task, especially in open-source ;) https://github.com/dlang/druntime/pull/2873
Dec 16 2019
On Monday, 16 December 2019 at 23:38:15 UTC, Petar Kirov [ZombineDev] wrote:On Monday, 16 December 2019 at 23:36:21 UTC, Petar Kirov [ZombineDev] wrote:This is awesome! Thank you for the fix!On Monday, 16 December 2019 at 13:23:56 UTC, Bogdan Szabo wrote:P.S. Thanks for reminding me of this issue Bogdan, sometimes communication is all that's necessary :)[..] This looks like an old issue, maybe we won't have this very soon... Is a DIP necessary for such changes?Elapsed time is not always a good indication of the complexity or feasibility of a task, especially in open-source ;) https://github.com/dlang/druntime/pull/2873
Dec 17 2019
On Tuesday, 17 December 2019 at 10:33:49 UTC, Bogdan Szabo wrote:On Monday, 16 December 2019 at 23:38:15 UTC, Petar Kirov [ZombineDev] wrote:+1 thanks a lot!On Monday, 16 December 2019 at 23:36:21 UTC, Petar Kirov [ZombineDev] wrote:This is awesome! Thank you for the fix!On Monday, 16 December 2019 at 13:23:56 UTC, Bogdan Szabo wrote:P.S. Thanks for reminding me of this issue Bogdan, sometimes communication is all that's necessary :)[..] This looks like an old issue, maybe we won't have this very soon... Is a DIP necessary for such changes?Elapsed time is not always a good indication of the complexity or feasibility of a task, especially in open-source ;) https://github.com/dlang/druntime/pull/2873
Dec 17 2019