pikapython/examples/_thread/thread_issue1.py
2024-08-09 03:30:07 +08:00

15 lines
180 B
Python

import time
import _thread
def task2():
while True:
print("123")
time.sleep_ms(201)
_thread.start_new_thread(task2, ())
while True:
time.sleep_ms(200)