The "@safe vs struct destructor" dilemma
Steven Schveighoffer
schveiguy at yahoo.com
Fri Apr 11 20:10:27 PDT 2014
On Fri, 11 Apr 2014 23:02:55 -0400, Michel Fortin
<michel.fortin at michelf.ca> wrote:
> Well, they are safe as long as they're not called by the GC. I think you
> could make them safe even with the GC by changing things this way:
>
> 1- make the GC call the destructor in the same thread the object was
> created in (for non-shared objects), so any access to thread-local stuff
> stays in the right thread, avoiding low-level races.
This needs to be done sooner rather than later. It would solve a lot of GC
annoyances.
I think in the ARC discussion, it also came up as a necessary step.
-Steve
More information about the Digitalmars-d
mailing list