If starting a separate thread make sure the thread doesn’t share resources with the skill object since this will hinder garbage collection when the skill is reloaded. You can start a process and detatch it once and then check if the process is running (either communication or search for running processes) ![]() If the process don’t need to outlive the skill I recommend starting the process in the _init_() method and having a custom shutdown method (override shutdown()) that terminates the subprocess in a neat way (I don’t always practice what I preach) I assume you want the process to outlive the skill start/shutdown?įor ease of installation an already running daemon is most likely not practical, since the normal skill install method doesn’t accommodate for installing custom services. ![]() There are however bad and good ways of doing this Execute Python script from C Library and redirect python - Execute Subprocess in Background - Stack Overflow How to. You never execute the B python run command lin in background questions Python Subprocess: The Simple Beginners Tutorial (2023) WebSimply run your command. If your code is not of continuous nature, your code will break no matter what you do, except you can add an If your code is intended to run forever, or for a. ![]() This is a great topic that may need some discussion as there are no firm rules or regulations ( anything goes).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |