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

MicroPython • Re: multithreading with Raspberry Pi Pico

$
0
0
_thread is bare metal on a Raspberry Pi Pico: you have to implement the locks, manage the memory, avoid contentions.
I have seen MicroPython multicore issues blamed on "you are doing it wrong", but I haven't seen anything which indicates how to do it right.

There's nothing I have seen which would lead anyone to think that MicroPython doesn't handle the nitty-gritty of contention, atomicity, locks, mutexes and whatever, itself. Which is what would be expected.

I am not accusing you of this, but some playing the "you are doing it wrong" card do seem to be indulging in some degree of victim blaming, trying to absolve MicroPython of being the problem.

Of course, threading in MicroPython is officially documented as -
This module is highly experimental and its API is not yet fully settled and not yet described in this documentation.
Which is pretty much "it might work, might not, and don't be surprised when it doesn't", which is fair enough, but threading is often advertised as if a solid and reliable feature when it's not, even in the official Raspberry Pi documentation.

I don't know what the solution is, but I do think people need to be made more aware that it may not work as expected, told exactly what to do to make it more likely it will work, especially told what they must do if that is indeed required to make it work.

Statistics: Posted by hippy — Wed Jul 31, 2024 10:10 am



Viewing all articles
Browse latest Browse all 4848

Trending Articles