Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import threading
- class MyThread():
- def start(self):
- self._thread = threading.Thread(target=self.run)
- self._thread.start()
- def run(self):
- print("thread started.")
- def run():
- myThread = MyThread()
- myThread.start()
- if __name__ == '__main__':
- run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement