Message367

Author bckfnn
Recipients
Date 2001-10-30.20:25:53
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=4201

I haven't made up my mind about this yet. We could register 
open PyFile instances in a global collection and have some 
exit code that close all the files in the collection. An 
implementation would probably have to use weak references 
on java2. On java1 the GC'ing of files would then be 
disabled, which means that we must have a way of disabling 
the entire close-at-exit feature.

It feels like a lot of code with only a little gain but I'm 
not dismissing it completely because the current behaviour 
result in complete and silent loss of a lot of information.

Is it worth the trouble? Of so, what should the default be? 
Enabled close-at-exit for java2 and disabled for java1?


Note 1: I'm not even considering changing the behaviour for
    open('test.txt','w').write('test')
Code like that will still not close the file immediately.

Note 2: Supporting the buffer size argument could be 
another workaround.
At the moment python files are always buffered and while 
disabling
buffering could help for the example code, the two issues 
(close-at-exit
and buffering) are different problems.
History
Date User Action Args
2008-02-20 17:16:52adminlinkissue448398 messages
2008-02-20 17:16:52admincreate