On Monday 31 January 2005 14:08, Glyph Lefkowitz wrote: > As it stands, this idiom works most of the time, and if an EMFILE errno > triggered the GC, it would always work.
That might help things on Unix, but I don't think that's meaningful. Windows is much more sensitive to files being closed, and the refcount solution supports that more effectively than delayed garbage collection strategies. With the current approach, you can delete the file right away after releasing the last reference to the open file object, even on Windows. You can't do that with delayed GC since Windows will be convinced that the file is still open and refuse to let you delete it. To fix that, you'd have to trigger GC from the failed removal operation and try again. I think we'd find there are a lot more operations that need that support than we'd like to think. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com