How to stop and restart the script? #12044
Replies: 1 comment 1 reply
-
You can try the code: #define NONE -1 extern int8_t command; /*************************************************/ /*************************************************/ /*************************************************/
} /*************************************************/
} /*************************************************/
} /*************************************************/ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm working on a project where I modified the minimal port to be able to use it for my processor (XMOS). In my application, I run a pre-compiled script file compiled using the mpy-cross cross compiler. Based on some commands. I want to start, stop and restart the script. Right now, I'm just able to start. I tried a few methods to stop, and it worked (not sure if it was the correct method), but then I was unable to restart the script again. Mainly, once I call mp_deinit( ), the code gets stuck if I call mp_init again.
My processor has multiple logical cores, and each one can run one thread function on it. So, I run the script on one thread and try to start, stop, and restart script execution from another thread function. Please check the semi-pseudo code, which is attached below and let me know if there is any better way to do it.
Beta Was this translation helpful? Give feedback.
All reactions