Multithreading problem

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
User avatar
atmuc
Posts: 18
Joined: Fri Nov 13, 2020 11:44 am
Location: Istanbul

Multithreading problem

Post by atmuc » Tue Nov 17, 2020 11:21 am

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?

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Multithreading problem

Post by jimmo » Tue Nov 17, 2020 12:46 pm

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.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Multithreading problem

Post by pythoncoder » Tue Nov 17, 2020 6:08 pm

Also interrupt handlers should be designed to execute fast so that they don't block other interrupts. See the docs.
Peter Hinch
Index to my micropython libraries.

Post Reply