[PYTHONMAC-SIG] apps freeze unless they print!

Bill Bedford billpy@mail.demon.net
Mon, 19 May 1997 19:28:18 +0100


At 5:46 pm +0100 19/05/97, Steven D. Majewski wrote:
~On Sun, 18 May 1997, Joseph J. Strout wrote:
~
~> I'm suddenly finding that Python locks up under the following conditions: I
~> have a program in a loop which is working very hard (or snoozing) for a

~
~
~Add the following line to the loop (plus an import MacOS, Evt somewhere):
~
~	MacOS.HandleEvent(Evt.GetNextEvent(-1)[1])
~
~
~You get a delay on the screen update from the sleep.
~I'm not sure why you get the lockup in the first place, but I
~sometimes see the event effects get done right after I command-dot
~out, so I expect it has something to do with the event queue.
~

It will also work as expected if you put a print statement before the loop.


Could it be that the event queue cannot start with a null event?

-----------------------------------------------------------------------
 Bill Bedford                                  Designer of Photo-Etches
 billb@mousa.demon.co.uk


               owner Brit_Rail-L  ---  british railways historical list

 -----------------------------------------------------------------------


_______________
PYTHONMAC-SIG  - SIG on Python for the Apple Macintosh

send messages to: pythonmac-sig@python.org
administrivia to: pythonmac-sig-request@python.org
_______________