Page 1 of 1

No 'signal' module for MP?

Posted: Wed Aug 17, 2022 6:32 pm
by Jibun no kage
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?

Posted: Wed Aug 17, 2022 11:38 pm
by jimmo
Jibun no kage wrote:
Wed Aug 17, 2022 6:32 pm
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.
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.

Re: No 'signal' module for MP?

Posted: Thu Aug 18, 2022 4:04 pm
by Jibun no kage
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.