1# test _thread.exit() function 2# 3# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd 4 5try: 6 import utime as time 7except ImportError: 8 import time 9import _thread 10 11 12def thread_entry(): 13 _thread.exit() 14 15 16_thread.start_new_thread(thread_entry, ()) 17_thread.start_new_thread(thread_entry, ()) 18 19# wait for threads to finish 20time.sleep(1) 21print("done") 22