The current implementation of heartbeats uses async code. It was also written before the SDAM spec was written.
The code would be simpler if it used a dedicated thread and sync calls. A dedicated thread would also protect the SDAM code from being starved from running when an application misuses Tasks in a way that interferes with the SDAM Tasks from getting a chance to run.
The SDAM code should be completely re-implemented to:
1. Follow the SDAM spec more closely which would involve using the same names and logic flow
2. Use a dedicated thread and sync driver calls (not async code)