Skip to content

Commit

Permalink
Only use suspended_task_address if we have coroutines
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed May 30, 2024
1 parent 40595c1 commit 1421c4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ttg/ttg/parsec/ttg.h
Original file line number Diff line number Diff line change
Expand Up @@ -3695,6 +3695,7 @@ ttg::abort(); // should not happen

task_t *task = (task_t*)parsec_task;

#ifdef TTG_HAS_COROUTINE
/* if we still have a coroutine handle we invoke it one more time to get the sends/broadcasts */
if (task->suspended_task_address) {
assert(task->coroutine_id != ttg::TaskCoroutineID::Invalid);
Expand Down Expand Up @@ -3725,6 +3726,7 @@ ttg::abort(); // should not happen
/* the coroutine should have completed and we cannot access the promise anymore */
task->suspended_task_address = nullptr;
}
#endif // TTG_HAS_COROUTINE

/* release our data copies */
for (int i = 0; i < task->data_count; i++) {
Expand Down

0 comments on commit 1421c4f

Please sign in to comment.