Ticket #20286: threadboom.py

File threadboom.py, 422 bytes (added by santagada@…, 15 years ago)

Minimal test case that show the bus error

Line 
1import threading
2import mimetypes
3import time
4
5race_flag = threading.Event()
6
7class Thread(threading.Thread):
8    def run(self):
9        race_flag.wait()
10        mimetypes.guess_type('sss')
11
12
13threads = []
14for i in range(5):
15    t = Thread()
16    t.start()
17    threads.append(t)
18
19time.sleep(0.5)
20print "Run Run Run"
21race_flag.set()
22time.sleep(1)
23[t.join() for t in threads]
24print "Your interpreter didn't blow up... sorry"
25