[Pythonmac-SIG] threads in OSX IDLE

Jack Jansen Jack.Jansen@cwi.nl
Fri, 5 Jul 2002 10:02:08 +0200


On Wednesday, July 3, 2002, at 03:43 , Jeff Senn wrote:

>
> Jack Jansen <Jack.Jansen@oratrix.com> writes:
>> Have you tried threads in IDLE on other (non-OSX) platforms? I could
>> imagine that threads and IDLE (or even threads and Tkinter) don't go
> ...
>
> I'm doing that now... The same version under Linux seems to work...
> (but that may be lucky -- see below)
>
>> If it works on other platforms then try getting a stacktrace: start
>> Python under gdb and get a traceback after it crashed.
>
> <sigh> it seems to have something to do with inserting the text into
> the idle (Tk) window from the "other thread".  Top of the stack dump 
> below.

Tk is deinitely not threadsafe. At least, it wasn't the last time I 
examined it. So this may well be your problem.

Maybe you should ask the Idle folks (there's a couple of people working 
on it) how feasible it is to create a threadsafe Idle.
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -