raidionics / Raidionics

Software for automatic segmentation and generation of standardized clinical reports of brain tumors from MRI volumes
https://raidionics.github.io/
BSD 2-Clause "Simplified" License
31 stars 4 forks source link

Bug: Unable to kill process when running #23

Open andreped opened 2 years ago

andreped commented 2 years ago

This has to do with when inference is started it is performed in the backend. We don't have a simple way to communicate with the backend. A better solution would be to create a process where the backend stuff is processing. When the cancel button is presses, we will kill the entire process, which in effect also should kill the backend processing.

However, as discussed in this issue, creating processes in frozen applications in python is challenging: https://github.com/dbouget/Raidionics/issues/20

dbouget commented 2 years ago

Should be able to kill all processes inside the mp.Pool now, as stated here. Will just have to make a class around the logic backend and have the mp.Pool as static variable. Might be some more issues if/when trying to kill a process during registration, due to ANTs.

andreped commented 1 year ago

Does this work now, @dbouget? If so, then I believe this issue can be closed.