Watchdog should not control the lifecycle of the provided executor. As a BackgroundResource, it should only unschedule itself from the executor if asked to be shutdown.
I believe this is more aligned with the intent #828 without surprising side effects on the lifecycle of the executor that is not controlled by the Watchdog or the WatchdogProvider.
Fixes #1858.
cc/ @igorbernstein2
Other approaches considered: #1875 , #1883.
Will add unit tests in a separate PR.
Further improvement: #1884.
Watchdog should not control the lifecycle of the provided executor. As a
BackgroundResource
, it should only unschedule itself from the executor if asked to be shutdown. I believe this is more aligned with the intent #828 without surprising side effects on the lifecycle of the executor that is not controlled by theWatchdog
or theWatchdogProvider
.Fixes #1858.
cc/ @igorbernstein2
Other approaches considered: #1875 , #1883. Will add unit tests in a separate PR. Further improvement: #1884.