durusmail: quixote-users: Re: Automatic removal of tempfiles in quixote.upload
Automatic removal of tempfiles in quixote.upload
2004-08-12
Re: Automatic removal of tempfiles in quixote.upload
2004-08-14
Re: Automatic removal of tempfiles in quixote.upload
2004-08-14
Re: Automatic removal of tempfiles in quixote.upload
2004-08-16
Re: Automatic removal of tempfiles in quixote.upload
2004-08-16
2004-08-16
Re: Automatic removal of tempfiles in quixote.upload
Graham Fawcett
2004-08-16
Jason E. Sibre wrote:

>>However, this might not be guaranteed in a plain-CGI deployment: the CGI
>>handler (the interpreter) could die before __del__ is called
>>(since __del__
>>calls are not guaranteed at interpreter shutdown). I don't do
>>plain-CGI, so I
>>can't prove this is the case, but it's the one deployment model I
>>can think of
>>where the interpreter shuts down rather quickly.
>>
>>
>In a CGI environment, why would the interpreter be shut down without having
>a chance to run the __del__()?  I mean, it isn't likely to get hit by a
>'kill' or anything external.  That's possible, but less likely than it would
>be in a LRP situation, I would think.
>
>I would figure the interpreter would keep running until ALL the python code
>was completed (barring cyclical references).
>
>
Unfortunately I don't know if __del__ will always be called during a
normal finalization. I haven't read the source, and the documentation
merely says, "It is not guaranteed that __del__() methods are called for
objects that still exist when the interpreter exits."

It looks like problems related to __del__ have already been reported in
Quixote:

http://mail.mems-exchange.org/pipermail/quixote-users/2004-March/002733.html

In short, I'd rather clean up explicitly. ;-)

-- Graham


reply