Reputation: 1059
I'm trying to use AbstractScheduledService
from google guava lib. In the docs for this class I see the following:
The executor will not be shutdown when this service stops.
Why do we want to leave executor thread alive after we have stopped the service? This seems a very strange architectural decision to me. What am I missing?
Upvotes: 1
Views: 539
Reputation: 2111
you could use the executor for multiple services (since it only provides it's threads for executing your code without any domain knowledge). Thats why it does make sense to not stop the executor when stopping the ScheduledService
Upvotes: 5