Message22911
Logged In: YES
user_id=35752
I think your patch is about as elegant as it can be. The
approach looks sound but I believe you forgot to clear the
wr_callback pointer. I'm attaching an incremental patch
(relative to patch3.txt).
Regarding gc_weakref.txt, I think we should add a note at
the top explaining the critical rule. I.e. after we can
computed the unreachable set (aka trash), it's okay to
invoke code that can access non-trash but we cannot allow
code to run that can reference trash.
There is only one minor issue that I can think of. We
decide which callbacks to invoke inside
move_troublemakers(). It's possible that unreachable
weakrefs become reachable when move_finalizer_reachable() is
called (i.e. weakrefs that would be trash except that they
got revived because they were referenced by an object with a
__del__ method). However, since those weakrefs would have
been trash I think it's okay not to invoke their callbacks. |
|
Date |
User |
Action |
Args |
2007-08-23 14:27:07 | admin | link | issue1055820 messages |
2007-08-23 14:27:07 | admin | create | |
|