← index #7368Issue #12694
Related · medium · value 2.365
QUERY · ISSUE

esp32 cannot create thread after opening ap

openby china-zhangdjopened 2021-06-08updated 2021-06-12

why esp32 cannot create thread after opening ap.

CANDIDATE · ISSUE

start_new_thread() can't create thread in mpython 1.21

closedby enesbcsopened 2023-10-15updated 2023-10-15
bug

Sample code used from:
https://mpython.readthedocs.io/en/master/library/micropython/_thread.html

import _thread
import time

def th_func(delay, id):
    while True:
        time.sleep(delay)
        print('Running thread %d' % id)

for i in range(2):
    _thread.start_new_thread(th_func, (i + 1, i))

MicroPython v1.21.0 on 2023-10-06; Generic ESP32 module with SPIRAM with ESP32

Traceback (most recent call last):
File "<stdin>", line 10, in <module>
OSError: can't create thread

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied