Author markroseman
Recipients Ivan.Pozdeev, docs@python, markroseman, serhiy.storchaka, terry.reedy
Date 2018-05-29.20:20:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527625232.95.0.682650639539.issue33479@psf.upfronthosting.co.za>
In-reply-to
Content
Ivan, thanks for making a good first pass of this. The thread section still feels a lot like 'fighting' with the model. Do you mind if I take a crack at it? Won't get to it for a few days, but in case you have any stuff you're in the middle of. 

I should clarify too that Tk apps almost universally do use a blocking event loop (i.e. 'vwait forever' at the end of a script). Application-level event handlers are supposed to respond quickly so control goes back to the event loop.

It's when control doesn't return there that things like the 'update idletasks' hacks are needed. In practice, I've noticed that's what seems to trip people up when they first start, as they try to emulate the flow of their non-GUI code, which frequently blocks. Far better that the program is restructured so that the event handler completes quickly. It's actually worse than it looks, because you can end up having nested event loops if you start randomly throwing this stuff in. That's conceptually hard for most people and a good source of bugs.
History
Date User Action Args
2018-05-29 20:20:33markrosemansetrecipients: + markroseman, terry.reedy, docs@python, serhiy.storchaka, Ivan.Pozdeev
2018-05-29 20:20:32markrosemansetmessageid: <1527625232.95.0.682650639539.issue33479@psf.upfronthosting.co.za>
2018-05-29 20:20:32markrosemanlinkissue33479 messages
2018-05-29 20:20:32markrosemancreate