Are we able to dedicate a thread to a specific core? #15387
Replies: 4 comments 1 reply
-
Which micropython port(s) are you considering? This is relevant as different ports handle CPU cores different |
Beta Was this translation helpful? Give feedback.
-
At least on a RP2040 processor, everything is running on core 0. |
Beta Was this translation helpful? Give feedback.
-
What about ESP32? |
Beta Was this translation helpful? Give feedback.
-
Esp32 can run Micropython only on one core. The second core is reserved for operating system tasks. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My question is simple - I have a thread, I want to tell micropython to run that thread on a single core and only that thread on that core, so that, with proper resource management on my part, that thread runs without having to give up the core?
[Edit] This will be running on a Raspberry Pi Pico.
I've read dozens of articles on this subject (as close I can get to it in searches, anyway), humorlessly reading multiple "original" articles that copied the same source code down to the spelling errors and providing keyhole commentary. These article state they are about using both cores, however, the code does not reflect that, only demonstrating how to start a second thread. There is nothing, that I could see, that locks the second thread to a specific core, and so I don't know if it is possible. These articles tend to be focused on multi-threading, but I want to know if the scheduler can lock code to cores. I've done this on larger systems using "processor sets" to manage simulation processes across 8 cores.
Beta Was this translation helpful? Give feedback.
All reactions