add bearpi_micropython doc and scripts

This commit is contained in:
KY-zhang-X
2022-10-12 18:53:59 +08:00
parent ed310f51bf
commit 525cfda2d8
57 changed files with 485 additions and 379 deletions

View File

@@ -0,0 +1,19 @@
import _thread
lock = _thread.allocate_lock()
n_thread = 4
n_finished = 0
def thread_entry(no):
print(no)
with lock:
global n_finished
n_finished += 1
if __name__ == '__main__':
for i in range(n_thread):
_thread.start_new_thread(thread_entry, (i,))
while n_finished < n_thread:
pass
print("done")