Thread problems

Tomek rtomek at hotmail.com
Thu May 8 04:44:21 EDT 2003


Aahz wrote:
> 
> How do you know the run() method isn't getting called?  If you are
> accurate about that, it pretty much has to be a gcc or RH9 bug; try
> running your program with a different OS/compiler combo (or at least
> recompile with optiizations turned off).

I have put a code of a sort (obviously, here it is vastly simplified):

t = ThreadSubclass()


print "Running the thread", t
t.start()
print "Thread should be running", t

class ThreadSubclass(Thread):
     def __init__(self, blah, blah):
          Thread.__init__()

     def run(self):
	print "Run has been executed"
         <some stuff here>

Obviously the number of 'Run has been executed' should be the same as 
the number of 'running the thread', but it is not.

I will try running it on different computer / version of linux today...

Thanks,

Tomek





More information about the Python-list mailing list