Message6364

Author pjenvey
Recipients alex.gronholm, fwierzbicki, pjenvey, zyasoft
Date 2011-01-30.21:32:56
SpamBayes Score 5.3945737e-13
Marked as misclassified No
Message-id <1296423176.55.0.445240875958.issue1701@psf.upfronthosting.co.za>
In-reply-to
Content
But there's probably actually 2 issues here:

1) Explicitly closing a file in this situation doesn't work. The EDT file writing in this example is using the with statement and even that doesn't flush the file. This is probably due to a little logic bug with the recent closer changes

2) However even with a quick fix for #1 I think we're still going to have the same problem when you *don't* explicitly call close on the file. 2.5.1 would flush that file on exit too

I think we can probably fix #2 for command line jython by joining all non daemon threads before having the main thread call cleanup().

Command line CPython does this. It calls threading._shutdown (which joins all threads registered with the threading module) before exiting.

Jython doesn't call threading._shutdown, but it wouldn't help this bug if it did: because the EDT thread is never registered in the threading module (threads created from pure Java are only registered with it lazily when the threading module is first used)
History
Date User Action Args
2011-01-30 21:32:56pjenveysetmessageid: <1296423176.55.0.445240875958.issue1701@psf.upfronthosting.co.za>
2011-01-30 21:32:56pjenveysetrecipients: + pjenvey, fwierzbicki, zyasoft, alex.gronholm
2011-01-30 21:32:56pjenveylinkissue1701 messages
2011-01-30 21:32:56pjenveycreate