[Python-Dev] Event loops, PyOS_InputHook, and Tkinter

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Nov 14 02:24:16 CET 2005


Michiel Jan Laurens de Hoon wrote:
> Greg Ewing wrote:
> 
> > How about running your event loop in a separate thread?
> 
> I agree that this works for some extension modules, but not very well 
> for extension modules for which graphical performance is critical

I don't understand. If the main thread is idle, your thread
should get all the time it wants.

I'd actually expect this to give better interactive response,
since you aren't doing busy-wait pauses all the time -- the
thread can wake up as soon as an event arrives for it.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+


More information about the Python-Dev mailing list