Beginning with threads

bbhaydon at my-deja.com bbhaydon at my-deja.com
Fri Jan 19 02:49:54 EST 2001


I am just starting with threads and am trying
to grasp what should and shouldn't be done...
I have a class that uses threads in one of its
functions. Should I make it inherit from threading??

for instance my code goes like:
import threading

class someclass:
   def somefunc(self):
     t = threading.Thread(target="self.someotherfunc", args = "args")
     t.start()
   def someotherfunc(self,args):
     do stuff

It's legal but..

regards,

Brett




Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list