Closed MBartkowiakSTFC closed 8 months ago
A few issues I've found from my testing so far.
Thanks for finding these problems! Regarding the jobs that keep running after the GUI has been closed: do they finish normally, and produce correct results?
Thanks for finding these problems! Regarding the jobs that keep running after the GUI has been closed: do they finish normally, and produce correct results?
I just tried it with a trajectory conversion and I closed the main window before it finished. After waiting some time it produced an MDT file which loads successfully with a new MDANSE.
So yea it appears to finish successfully.
That's good, really. Thanks for checking!
I will fix the other problems in this PR, and for the processes outliving the GUI we will have to make a separate issue.
Everything seems to work from my testing.
The only thing is that when I run a trajectory conversion, the MDT file are created before its completes. When I terminate the job the files remain. I've created #342 for this issue.
Description of work We switch from QThread to multiprocessing.Process for starting new jobs. This way the jobs will not be competing for the Python GIL.
Fixes A State pattern has been implemented for jobs. A context menu lets the user pause, restart and terminate jobs from the GUI. Each job is a process and uses pipes to communicate with the main process.
To test Run a few longer jobs at the same time. See if they all use 100% of a CPU core. Try pausing and resuming them.