From 36c453b435abcd023196b465beba48cdc35c44a5 Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Thu, 21 Nov 2024 09:03:23 -0500 Subject: [PATCH] Destroy device coroutine once all sends have been issued Signed-off-by: Joseph Schuchart --- ttg/ttg/parsec/ttg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ttg/ttg/parsec/ttg.h b/ttg/ttg/parsec/ttg.h index 509b3a1d4..cd4ef6edf 100644 --- a/ttg/ttg/parsec/ttg.h +++ b/ttg/ttg/parsec/ttg.h @@ -3835,6 +3835,7 @@ namespace ttg_parsec { task->tt->set_outputs_tls_ptr(old_output_tls_ptr); detail::parsec_ttg_caller = nullptr; } + dev_task.destroy(); // safe to destroy the coroutine now } #endif // TTG_HAVE_DEVICE /* the coroutine should have completed and we cannot access the promise anymore */