GC interuptable?
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Sat Dec 16 09:39:58 PST 2006
Sean Kelly wrote:
> chrisj wrote:
>> How hard would it be to stop such a thread buggering up the GC?
>
> It shouldn't be the sole owner of GCed memory or the memory may
> disappear out from under it. Beyond that, it should be fine.
Until a moving collector appears on the scene...
Since such a collector should be perfectly legal according to the spec,
such a thread basically can't use any GC-allocated memory at all without
invoking undefined behavior.
However as far as it concerns current implementations I'm aware of
you're correct; undefined behavior has the unfortunate property that it
may mean "it does exactly what you'd expect it to do".
More information about the Digitalmars-d
mailing list