simple Thread question

Christopher T King squirrel at WPI.EDU
Tue Aug 3 22:42:36 CEST 2004


On Tue, 3 Aug 2004, Dave Brueck wrote:

> Er... you're jumping the gun a bit - no need to scare the OP away from 
> threads with all these details about the GIL when the problem was simply 
> that the threads were never started.
> 
> [snip]
> > Because of the former property, another thing you can try is 
> > inserting a time.sleep(.1) inside of each loop
> 
> Uh, did you read his code before responding? (hint: he's already doing 
> that) :)

Wow, I really screwed that up :P I really should stop posting to this list
in a hurry.  My eyes glanced at the short loop, the thread-starting code
(didn't notice the .run() instead of .start()), and the output, and
concluded "GIL funkiness" (something I've been hit with before).

FWIW, replacing .run() with .start() (and dropping name from .run()) and 
dropping the sleep() produces the same symptoms the OP was showing.




More information about the Python-list mailing list