1 Star 0 Fork 11

刘荣福/microPython

forked from QuecPython/microPython 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
thread_exit1.py 397 Bytes
一键复制 编辑 原始数据 按行查看 历史
chenchi 提交于 2021-06-03 16:44 +08:00 . first commit
# test _thread.exit() function
#
# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
try:
import utime as time
except ImportError:
import time
import _thread
def thread_entry():
_thread.exit()
_thread.start_new_thread(thread_entry, ())
_thread.start_new_thread(thread_entry, ())
# wait for threads to finish
time.sleep(1)
print("done")
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/oi-lrf/microPython.git
git@gitee.com:oi-lrf/microPython.git
oi-lrf
microPython
microPython
master

搜索帮助