Skip to content

Commit db2eae3

Browse files
committed
Properly defer continuations if the cont_req is inactive
Runnable continuations should be added to cont_complete_defer_list if the continuation request is inactive, so that it can be enqueued for execution once the request is enabled. Signed-off-by: Joseph Schuchart <[email protected]>
1 parent 45cf9c7 commit db2eae3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ompi/mpiext/continue/c/continuation.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,8 @@ ompi_continue_enqueue_runnable(ompi_continuation_t *cont)
567567
}
568568
if (NULL != cont_req->cont_complete_list) {
569569
opal_list_append(cont_req->cont_complete_list, &cont->super.super);
570+
} else if (cont_req->super.req_state == OMPI_REQUEST_INACTIVE) {
571+
opal_list_append(&cont_req->cont_complete_defer_list, &cont->super.super);
570572
} else {
571573
/* someone started the request before we took the lock, go back and check again
572574
* this should be rare so we don't care about taking the lock again */

0 commit comments

Comments
 (0)