Very limited shared promotion
Ola Fosheim Grostad
ola.fosheim.grostad at gmail.com
Tue Jun 18 21:42:50 UTC 2019
On Tuesday, 18 June 2019 at 21:20:13 UTC, Jonathan M Davis wrote:
> escape. However, all that's required is a piece of @trusted
> code with access to the scope object, and all protections go
> out the window. At that point, it's up to the programmer to
So if I implement a container with @trusted method that grabs a
reference to the object, which is reasonable, then it will fail?
Or is there a "temporarily unshared" type that the container
implementor could test for? Or is the argument that this would
also fail for new/delete of reference counting so that you will
try to reuse all the ref counting semantics on the shared level?
Is the idea to treat a grabbed lock as "generating a new object"
and deal with it as refernce counting? Then you need to check
that all locks have been released to avoid deadlocks/starvation...
This will only work in simple scenarios though...
More information about the Digitalmars-d
mailing list