-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add qprocess job launching #328
Conversation
…to add-qprocess-job-launching
…to add-qprocess-job-launching
…to add-qprocess-job-launching
…to add-qprocess-job-launching
A few issues I've found from my testing so far.
|
Thanks for finding these problems! |
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.