[Tutor] Re: Threading a Class?
Britt Green
britt_green@hotmail.com
Tue, 10 Jul 2001 07:37:07 -0700
<snip>
>import threading
>
>mythread = threading.Thread(target=myTime.updateTime)
>mythread.start()
>
>Now mythread is running the updateTime function, and your program continues
>in the main thread.
<snip>
Is there a way to make the GameTimer class itself threaded? I've seen some
examples that look a bit like this:
class GameTimer(threading.Thread):
def__init__(self):
threading.Thread.__init__(self)
def run (self):
#stuff here
But I'm a little unsure of exactly how to do this. Is there an advantage to
one over the other?
Britt
--
It is pitch black. You are likely to be eaten by a grue.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com