File: thread_example.py

package info (click to toggle)
python-traitsui 8.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,232 kB
  • sloc: python: 58,982; makefile: 113
file content (16 lines) | stat: -rw-r--r-- 236 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# thread_example.py

from threading import Thread
from time import sleep


class MyThread(Thread):
    def run(self):
        sleep(2)
        print("MyThread done")


my_thread = MyThread()

my_thread.start()
print("Main thread done")