Task based vs. thread based Watchdog - but async needed
问题 We're using watchdogs to determine whether a connected system is still alive or not. In the previous code we used TCP directly and treated the watchdog in a separate thread. Now is a new service used that provides it's data using gRPC. For that we tried using the async interface with tasks but a task based watchdog will fail. I wrote a small DEMO that abstracts the code and illustrates the problem. You can switch between task based watchdog and thread based watchdog by commenting out line 18