-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Enable cross-interpreter sharing of tuples #111623
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
Comments
Quick question @tonybaloney , is |
Excellent question! The underlying machinery for shareable objects isn't very sophisticated currently. FWIW, the relevant code for the (currently internal-only) shareable-type protocol is in Include/internal/pycore_crossinterp.h and Python/crossinterp.c. For the Keep in mind that, right now, the machinery for shareable objects is implemented with a global registry of types but I plan on writing a PEP in the near future targeting 3.13 to add a dedicated field to |
Thank you for the explanation on the current design! Yeah, it makes sense that |
Feature or enhancement
Proposal:
This issue is for adding support of sharing tuples (and tuples of tuples) through the crossinterp API and the interpreters module when that arrives.
The data structure will have to have a variable length.
It will use the xid registry to lookup the type values in the tuple, then encode them using the crossinterpdatafunc callbacks. This should work recursively if the tuple contains a tuple.
PR to follow.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: