2016-12-29 13:12:06 +11:00
|
|
|
# test raising exception within thread which is not caught
|
2022-08-18 16:57:45 +10:00
|
|
|
import time
|
2016-12-29 13:12:06 +11:00
|
|
|
import _thread
|
|
|
|
|
2020-03-22 21:26:08 -05:00
|
|
|
|
2016-12-29 13:12:06 +11:00
|
|
|
def thread_entry():
|
|
|
|
raise ValueError
|
|
|
|
|
2020-03-22 21:26:08 -05:00
|
|
|
|
2016-12-29 13:12:06 +11:00
|
|
|
_thread.start_new_thread(thread_entry, ())
|
2022-08-18 16:57:45 +10:00
|
|
|
time.sleep(1)
|
2020-03-22 21:26:08 -05:00
|
|
|
print("done")
|