Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from threading import Thread
- class myClassA(Thread):
- def __init__(self):
- Thread.__init__(self)
- self.daemon = True
- self.start()
- def run(self):
- while True:
- print 'A'
- class myClassB(Thread):
- def __init__(self):
- Thread.__init__(self)
- self.daemon = True
- self.start()
- def run(self):
- while True:
- print 'B'
- myClassA()
- myClassB()
- while True:
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement