-
-
Notifications
You must be signed in to change notification settings - Fork 432
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
Prevent shutdown of shared thread pool #2531
Conversation
5ec774f
to
e2f1b4f
Compare
The I'd see two options:
@janvyb and @openhab/core-maintainers WDYT? |
Yeah, I can see that it might be a problem. How about creating another wrapper around |
|
Fixes openhab#760 Signed-off-by: Jan Vybíral <[email protected]>
What about this? It should be safe as long as noone cast the returned |
Might work that way. But what was wrong about the idea to create an internal subclass of |
I'd also have to create subclass of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, thank you!
Let's merge and see if it all works as expected :-)
Fixes openhab#760 Signed-off-by: Jan Vybíral <[email protected]> GitOrigin-RevId: a328443
Right now shared thread pools can be shut down, which leads to many problems (as described in #760 and #2465).
This PR fixes it by overriding shutdown and shutdownNow methods on wrapper classes around thread pools returned from factory methods on ThreadPoolManager, preventing shutdown and logging errors to help find out what addon calls them. This should not cause any issues since shared pools are never shut down by framework.
Closes #760