ISISNeutronMuon / MDANSE

MDANSE: Molecular Dynamics Analysis for Neutron Scattering Experiments
https://www.isis.stfc.ac.uk/Pages/MDANSEproject.aspx
GNU General Public License v3.0
18 stars 4 forks source link

[BUG] multiprocessing jobs cannot be aborted #472

Open MBartkowiakSTFC opened 2 weeks ago

MBartkowiakSTFC commented 2 weeks ago

Description of the error At the moment it is not possible to abort a multiprocessing job from the GUI.

Describe the expected result After "Terminate" has been clicked in the job's context menu, it should stop running as soon as possible.

Describe the actual result The GUI shows the status as "Aborted", but the job keeps running in the background.

Suggested fix An extra multiprocessing.Event object could be added to the inform the subprocesses that they should terminate.

Additional details A lone subprocess seems to be created when a job is started from the GUI, and it exists even after the job has finished. While it does not consume any CPU time, it does take up some memory.