diff options
author | Sunil Shetye | 2025-06-19 17:58:27 +0530 |
---|---|---|
committer | Sunil Shetye | 2025-06-19 17:58:34 +0530 |
commit | 9751241627d1b04a8fc028ae8be12ab913cc451d (patch) | |
tree | 9a99d35f6f96ac68a9185eff2ffec4e3da9c217f | |
parent | d00bab6a5c00b81e8532b82aed98d581b703ab6b (diff) | |
download | Common-Interface-Project-9751241627d1b04a8fc028ae8be12ab913cc451d.tar.gz Common-Interface-Project-9751241627d1b04a8fc028ae8be12ab913cc451d.tar.bz2 Common-Interface-Project-9751241627d1b04a8fc028ae8be12ab913cc451d.zip |
wait for scilab to end
-rw-r--r-- | blocks/simulationAPI/helpers/scilab_manager.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/blocks/simulationAPI/helpers/scilab_manager.py b/blocks/simulationAPI/helpers/scilab_manager.py index 63cb85ec..ce420eee 100644 --- a/blocks/simulationAPI/helpers/scilab_manager.py +++ b/blocks/simulationAPI/helpers/scilab_manager.py @@ -1143,9 +1143,15 @@ def start_scilab(session, task, xcosfile): except subprocess.TimeoutExpired: pass + gevent.spawn(wait_for_instance, diagram) return "" +def wait_for_instance(diagram): + diagram.instance.proc.wait() + kill_scilab(diagram) + + def stopDetailsThread(diagram): diagram.tkbool = False # stops the thread gevent.sleep(LOOK_DELAY) |