Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5114

MicroPython • About the core use when using _thread module?

$
0
0
I read "Raspberry Pi Pico Python SDK" document, 3.5 Multicore Support write:
"Only one thread can be started/running at any one time, because there is no RTOS just a second core. The GIL is not
enabled so both core0 and core1 can run Python code concurrently, with care to use locks for shared data."


First, I feel puzzled about these words, it says only one thread can be running because there is no RTOS,but then it says both core can run concurrently,is this contradiction.
so, the two cores can or can not run concurrently? such as core0 run main thread, core1 run another thread?

Second, when using _thread module to start another thread, does that mean the core1 will start to execute this thread?
or few threads were executed in turn by one core or by two cores?

I just want to using these two cores concurrently to deal with some thing.

Statistics: Posted by keepzen — Tue Nov 26, 2024 1:59 pm



Viewing all articles
Browse latest Browse all 5114

Trending Articles