Skip to content

Commit 803ad72

Browse files
authored
Add an assertion in post coroutine-resume cleanup (#1728)
1 parent 982d9cb commit 803ad72

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/tbb/task.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ void task_dispatcher::do_post_resume_action() {
172172
task_dispatcher* to_cleanup = static_cast<task_dispatcher*>(td->my_post_resume_arg);
173173
// Release coroutine's reference to my_arena
174174
td->my_arena->on_thread_leaving(arena::ref_external);
175+
__TBB_ASSERT(is_alive(td->my_arena->my_guard), "The arena should not have been destroyed");
175176
// Cache the coroutine for possible later re-usage
176177
td->my_arena->my_co_cache.push(to_cleanup);
177178
break;

0 commit comments

Comments
 (0)