The boardwalk CLI pushes a heartbeat, using a separate thread, to the boardwalkd server (when one is configured) while it's running. In very rare cases, the heartbeat thread was not closing, because the thread was being closed improperly by attempting to cancel a future. Cancelling futures is not a reliable way to close a thread because it will always fail to be cancelled if the thread is currently running an operation. This issue has been seen rarely because the heartbeat has to be running at the moment the cancel attempt is made.
This changes the way the heartbeat thread is closed by instead passing an event object into the thread, which can then be manipulated outside of the thread.
How was this tested?
Tested locally in debug mode by attempting to exit the boardwalk CLI multiple times while the heartbeat was running. Ensured the debug message output shows that the thread's exit condition is being met.
Checklist
[x] Have you updated the VERSION file (if applicable)?
What and why?
The boardwalk CLI pushes a heartbeat, using a separate thread, to the boardwalkd server (when one is configured) while it's running. In very rare cases, the heartbeat thread was not closing, because the thread was being closed improperly by attempting to cancel a future. Cancelling futures is not a reliable way to close a thread because it will always fail to be cancelled if the thread is currently running an operation. This issue has been seen rarely because the heartbeat has to be running at the moment the cancel attempt is made.
This changes the way the heartbeat thread is closed by instead passing an event object into the thread, which can then be manipulated outside of the thread.
How was this tested?
Tested locally in debug mode by attempting to exit the boardwalk CLI multiple times while the heartbeat was running. Ensured the debug message output shows that the thread's exit condition is being met.
Checklist