-
Notifications
You must be signed in to change notification settings - Fork 14
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
shutting down a component with messages left in the outbox considered harmful #309
Comments
I considered a Of course then you could forget that, especially if you're using some framework or something that doesn't allow you to write a real reuse loop. I suppose we could have a Ideally, all languages would do RAII and then we could do something like this in the In the end MUSCLE3 is a cooperative system, and if one of the components misbehaves then the others cannot do much else than log an error and quit, which I think is what they're already doing? Maybe that warning should point to a documentation page that lists possible reasons why the other code crashed, and includes a missing |
I think that would be best indeed, it is unfortunately relatively common for folks to call the API the wrong way |
We do have the ApiGuard now at least, that helps. Do you have any ideas on why things go wrong? Is the documentation not clear enough, or do the examples not match the environment people are in so that they become unhelpful or even misleading? Does the API itself fit into people's code poorly? |
We just encountered a case where a
reuse_instance
call was not done at the end of the internal loop. This caused the instance to shut down, while there were still listeners attached, who could then not contact the component anymore.Does it make sense to hook into a 'clean' shutdown process (can we even do that?) and log a warning if the outbox is not fully emptied? Perhaps a
finalize
call should do this kind of things?The text was updated successfully, but these errors were encountered: