[Python-Dev] reference leaks, del, and annotations (original) (raw)
Tim Peters tim.peters at gmail.com
Wed Apr 5 04:40:17 CEST 2006
- Previous message: [Python-Dev] reference leaks, __del__, and annotations
- Next message: [Python-Dev] SF #1462485 - StopIteration raised in body of 'with' statement suppressed
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Greg Ewing]
That's really what I'm asking -- what does a generator finaliser need to reference? Or does it depend on what the generator's code does?
A generator finalizer can execute arbitrary Python code. Note that even if that was limited (which it isn't -- there are no limitations) to executing "pass", it wouldn't be exploitable, because the GIL can be released during any Python code, allowing other threads to run anything before the finalizer returns.
- Previous message: [Python-Dev] reference leaks, __del__, and annotations
- Next message: [Python-Dev] SF #1462485 - StopIteration raised in body of 'with' statement suppressed
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]