Skip to content

Commit

Permalink
Make the crash when coroutine tries to cancel itself more readable
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Sustrik <[email protected]>
  • Loading branch information
sustrik committed Oct 31, 2018
1 parent 16f0fcd commit 94d2b02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cr.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,10 @@ static void dill_cr_close(struct dill_hvfs *vfs) {
should get control back pretty quickly. */
cr->closer = ctx->r;
int rc = dill_wait();
/* This assertion triggers when coroutine tries to close a bundle that
it is part of. There's no sane way to handle that so let's just
crash the process. */
dill_assert(!(rc == -1 && errno == ECANCELED));
dill_assert(rc == -1 && errno == 0);
}
#if defined DILL_CENSUS
Expand Down

0 comments on commit 94d2b02

Please sign in to comment.