All pastes #158260 Raw Edit

marc

public text v1 · immutable
·published 2006-09-02 01:32 UTC
rendered paste body
import threadingclass MyThread(threading.Thread):	def __init__(self):		threading.Thread.__init__(self)		self.stopthread = threading.Event()	def run(self):		for f in xrange(0,5):			print "Hello from the thread"	def stop(self):		self.stopthread.set()mythread = MyThread()mythread.start()for f in xrange(0,4):	print "hello from the outside"#--------------------------------------------------# //mythread.stop()#--------------------------------------------------