circuitpython/tests/thread/thread_exc2.py

13 lines
204 B
Python
Raw Normal View History

# test raising exception within thread which is not caught
import utime
import _thread
2021-03-15 19:27:36 +05:30
def thread_entry():
raise ValueError
2021-03-15 19:27:36 +05:30
_thread.start_new_thread(thread_entry, ())
utime.sleep(1)
2021-03-15 19:27:36 +05:30
print("done")