[Proposal] Weak reference implementation for D
Denis Shelomovskij
verylonglogin.reg at gmail.com
Wed Oct 16 04:26:28 PDT 2013
16.10.2013 3:20, Sean Kelly пишет:
> On Tuesday, 15 October 2013 at 22:09:17 UTC, Robert wrote:
>>
>> The problem is that destructors and thus the registered hooks for the
>> dispose events are called when threads are already resumed. If this
>> wasn't the case there would actually be no problems.
>
> Gotcha. Looking at the code... I think you'll get this to work, but
> manipulating such user-mode weak references seems really expensive. Why
> not work on a DIP to get them built in? For example, one option might
> be to have the GC perform certain types of finalization while the world
> is stopped. This would have to be limited to very rudimentary stuff,
> and the easiest way to guarantee that would be to have everything live
> in Druntime.
What about this:
https://github.com/D-Programming-Language/druntime/pull/639
--
Денис В. Шеломовский
Denis V. Shelomovskij
More information about the Digitalmars-d
mailing list