← index #3667Issue #6381
Off-topic · high · value 2.008
QUERY · ISSUE

esp8266: multi threading

openby misisnikopened 2018-03-12updated 2018-12-06
enhancementport-esp8266

Is it possible to build MicroPython for esp8266 with _thread support and how?

CANDIDATE · ISSUE

threading problem

closedby kdschlosseropened 2020-08-28updated 2020-09-02

I am using an ESP32 and MicroPython 1.12 and I have a question that may be a bug.

How does one go about stalling a thread without spinning wheels?? When using any other flavor of Python if a thread spins it's wheels it will chew up 100% of the processor. (on a multicore processor it will chew up a single core).

I have not tested any code on the ESP as of yet, I thought I would ask before I make an error and have to change a bunch of code around. I normally use threading,Event so I have the option of stalling a thread until an event occurs or for a specified amount of time. I do not think that the threading module exists in MicrooPython.

I specifically need an event based stall. I would think that utime.sleep_ms would apply to a thread nd not globally. I could be wrong tho.

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