[Proposal] Weak reference implementation for D

Denis Shelomovskij verylonglogin.reg at gmail.com
Sun Oct 13 09:50:57 PDT 2013


13.10.2013 12:55, Sönke Ludwig пишет:
> Am 13.10.2013 09:47, schrieb Denis Shelomovskij:
> Just to reassure, the following race-condition doesn't exist, right? It
> looks like "GC.addRoot()" makes guarantees by taking the GC lock or
> something similar?
>
>           time ->
> thread1: GC collection |               | run finalizer |
> thread2: paused        | lock weak ref |               | access object
>

All public GC API uses same mutex. So right, no races here. )

-- 
Денис В. Шеломовский
Denis V. Shelomovskij


More information about the Digitalmars-d mailing list