circuitpython/tests/thread/thread_exc2.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

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 09:57:36 -04:00
def thread_entry():
raise ValueError
2021-03-15 09:57:36 -04:00
_thread.start_new_thread(thread_entry, ())
utime.sleep(1)
2021-03-15 09:57:36 -04:00
print("done")