998b6cc
1
2
3
4
5
6
7
8
9
10
11
12
13
import threading import time def worker(): print("Worker thread starting...") time.sleep(1) print("Worker thread finishing.") thread = threading.Thread(target=worker) thread.start() thread.join() print("Main thread finishing.")