Message368913
I see two options:
* Add a field to PyObject, but only in a special debug mode. Maybe not even in Py_DEBUG (since I managed to make Py_DEBUG ABI-compatible with the release mode!)
* Add an hash table mapping an object to its interpreter. The hash table would only be used in debug mode. It may even be turned on at runtime depending on a command line option or something else.
See also bpo-40514: [subinterpreters] Add --experimental-isolated-subinterpreters build option.
Antoine: "Can I ask why you're considering this? I thought you didn't want to transfer ownership between interpreters."
I guess that the purpose is to ensure that: detect when an object is shared between two interpreters.
Currently, tons of objects are still shared between interpreters. Starting with static types: see bpo-40601 "[C API] Hide static types from the limited C API". |
|
Date |
User |
Action |
Args |
2020-05-15 01:51:49 | vstinner | set | recipients:
+ vstinner, ncoghlan, pitrou, eric.snow, emilyemorehouse |
2020-05-15 01:51:49 | vstinner | set | messageid: <1589507509.03.0.628601391814.issue33607@roundup.psfhosted.org> |
2020-05-15 01:51:49 | vstinner | link | issue33607 messages |
2020-05-15 01:51:48 | vstinner | create | |
|