Message9168
I implemented the described solution in
https://bitbucket.org/stewori/jynithon/commits/3e69cdc11ec7f94c506b1cfcffbbdaabd7bb60fe
and it works beautifully. However, some of the promised benefits don't applY :(
- no more threads like the refReaper thread in the weakref module
The thread is still necessary, because it triggers callbacks. When I mentioned its obsoleteness, I had in mind it would only do clean-up.
- would make weak hash maps obsolete in several places
The weak hash map in IdImpl is still needed as it assures the id depends on the javaProxy. Indeed, PyObjects with same javaProxys shall be considered equal (c.f. PyObject._is) and have equal ids.
I noticed that CPython (tested with 2.7.5) sometimes also changes ids on resurrection and also breaks weakref.getweakrefs(). Both is the case, if cyclic garbage was collected; in contrast id and getweakrefs are preserved, if garbage is cleared by ref-counts dropping to 0.
I would consider this a bug in CPython and still think it should be fixed the way I proposed. |
|
Date |
User |
Action |
Args |
2014-10-25 21:29:18 | stefan.richthofer | set | messageid: <1414272558.57.0.0755499994508.issue2224@psf.upfronthosting.co.za> |
2014-10-25 21:29:18 | stefan.richthofer | set | recipients:
+ stefan.richthofer |
2014-10-25 21:29:18 | stefan.richthofer | link | issue2224 messages |
2014-10-25 21:29:17 | stefan.richthofer | create | |
|