No 'signal' module for MP?
-
- Posts: 144
- Joined: Mon Jul 25, 2022 9:45 pm
No 'signal' module for MP?
I take it, since I did not find anything about it, that the typical 'signal' module is not implemented in MP as yet? Or may never be as things stand at the moment? Not a problem just asking. I have some python code I was going to port over to MP, with some changes of course, that uses SIGINT, SIGTERM. And realized that 'signal' support is not in MP. Time to get creative.
Re: No 'signal' module for MP?
Are you on the Unix port or on a microcontroller? There's no `signal` implementation because it doesn't really make sense on a microntroller.Jibun no kage wrote: ↑Wed Aug 17, 2022 6:32 pmI take it, since I did not find anything about it, that the typical 'signal' module is not implemented in MP as yet? Or may never be as things stand at the moment? Not a problem just asking. I have some python code I was going to port over to MP, with some changes of course, that uses SIGINT, SIGTERM. And realized that 'signal' support is not in MP. Time to get creative.
-
- Posts: 144
- Joined: Mon Jul 25, 2022 9:45 pm
Re: No 'signal' module for MP?
True, I was thinking about Unix port, but I also happen to be porting the code to ESP/Pico, it was sensor based, BMP280, BME280, etc., and that was when I looked for the signal support. Have not spent much time with I2C or SPI support in MP as yet, but I am going to have to restructure a few things.
The idea that it is often 'correct' to just reset or let a micro-controller reset, versus extensive clean up code, is counter culture to my experience on development on a traditional OS, such as Windows or Linux. But learning is fun, so interesting if different mind set.
However, I would raise one point, as multi-core micro-controllers have become the norm, and threading or other parallelism is leveraged across cores, inter-core communication, using signaling, or shared event states, that argues for such to mature on micro-controllers.
The idea that it is often 'correct' to just reset or let a micro-controller reset, versus extensive clean up code, is counter culture to my experience on development on a traditional OS, such as Windows or Linux. But learning is fun, so interesting if different mind set.
However, I would raise one point, as multi-core micro-controllers have become the norm, and threading or other parallelism is leveraged across cores, inter-core communication, using signaling, or shared event states, that argues for such to mature on micro-controllers.