Page 1 of 1

Multithreading problem

Posted: Tue Nov 17, 2020 11:21 am
by atmuc
I have a thread that prints a counter. I also print another counter in the main loop. It works fine.

When a pin interrupt starts, my thread pauses until the interrupt handler code finished. is this normal?

Re: Multithreading problem

Posted: Tue Nov 17, 2020 12:46 pm
by jimmo
atmuc wrote:
Tue Nov 17, 2020 11:21 am
is this normal?
Even though the ESP32 is dual-core, MicroPython only uses one of the cores.

Re: Multithreading problem

Posted: Tue Nov 17, 2020 6:08 pm
by pythoncoder
Also interrupt handlers should be designed to execute fast so that they don't block other interrupts. See the docs.