Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*Localize* objects once the bridge of the owning region object reaches RC=0 #51

Open
xFrednet opened this issue Nov 8, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@xFrednet
Copy link
Collaborator

xFrednet commented Nov 8, 2024

When the bridge object of a region hits a reference count of zero, it is no longer possible to send it anywhere. Implicitly, it's therefore ensured that all objects contained in a that region are bound to the lifetime of any borrows of those objects.

It should be possible to move these objects back into the local region. This would make the system more flexible, by allowing these objects to be put into another region again. It would basically act as a very cheap extract operation.

b = {} # b is a local object

a = Region()
a.b = b # is moved into region a

a = None # a's RC hits zero
# By moving all objects in `a` (namely b in this case) back into
# the local region. We could then send b into another region again

c = Region()
c.b = b # This would become valid with this change

This makes region closer to a box used to send data. A different scope can then decide to unpack the stored data and repackage it.

@xFrednet xFrednet added the enhancement New feature or request label Nov 8, 2024
@xFrednet xFrednet added this to the PLDI milestone Nov 15, 2024
@xFrednet
Copy link
Collaborator Author

Aim this to be fixed for PLDI as part of #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant