Skip to content
Discussion options

You must be logged in to vote

On the RPi Pico you have up to 2 threads that run on the two cores in parallel. As soon as you start another thread with
_thread.start_new_thread(thread_func, (arg0)) this will employ the second core. Attempting to start yet another thread will raise an Error of too many threads. This is because your MP interpreter is the first thread, so to say, and there are only the two threads each on it's core.

Is there a way to know what CPU is used from inside a method?

Not with _thread . There is a rudimentary port of threading in micropython-lib which at the cost of overhead implements a Thread class with many more functions, perhaps also a core function. If not, you may extend it, as you see t…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@cve2022
Comment options

@cve2022
Comment options

@rkompass
Comment options

@rkompass
Comment options

@cve2022
Comment options

Answer selected by cve2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants