From 3fe564d3af1072a85e82d7c6eb39011abe55ea9d Mon Sep 17 00:00:00 2001 From: K Pamnany Date: Wed, 18 Sep 2024 17:28:43 -0400 Subject: [PATCH] Address review comment --- src/threading.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/threading.c b/src/threading.c index 45161e32c5ed9..d89e8d09745fc 100644 --- a/src/threading.c +++ b/src/threading.c @@ -1035,8 +1035,13 @@ JL_DLLEXPORT int jl_heartbeat_resume(void) if (uv_sem_trywait(&heartbeat_off_sem) != 0) { return -1; } + + // reset state as we've been paused n_hbs_missed = 0; n_hbs_recvd = 0; + tasks_showed = 0; + + // resume heartbeat_enabled = 1; uv_sem_post(&heartbeat_on_sem); // wake the heartbeat thread return 0;