-
Notifications
You must be signed in to change notification settings - Fork 20
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
No way to gracefull exit async workers #37
Comments
Hi, the current implementation via shutDownScu does not use cancel of running threads but rather waits for them to finish (thread join) there last task, which is normally what you want. But Indeed this might not work for storeOnly set to true (as this uses the old dcmtk implementation - will have a look at this). The only problematic async worker is storeSCP as it runs forever (except when receiving shutDownScu), all other works should stop after their task (e.g. CFind looking up data, C-Get loading data...) Long running C-Get or Move operations could be canceled from outside via C-Cancel requests (although DCMTK supports this, I haven't tested it with this code). Maybe you could describe your workflow and use case, so I can know what to focus on? |
Hi, |
Same here. I use storescp in a Electron app with storeOnly set to true, but it prevents the whole app from exiting.
|
Hi, last time I tried to use the addon in electron I failed bundling it correctly, so seems you have it working. (If you have some pointers/examples how to do this I would be interested). While 1 would be better it might be quite some work. The relevant code part for 2 is this: So, will try to do 1 and fallback to 2 in case of issues. (PRs would also be welcome if you've got the experience to do it) |
Thanks for the pointers, it's now more clear to me why StoreSCP behaves that differently.
I'm going to have a look at the options you pointed at, and see if I can come up with something. |
There's no easy way to unref or cancel async workers such as startStoreScp. While shutDownSCU exists, it only works if storeOnly is false. Is there a better way to exit all dcmtk workers on exit?
The text was updated successfully, but these errors were encountered: