Skip to content

Commit 8a3ceb5

Browse files
committed
add assertion
1 parent 58a5bc2 commit 8a3ceb5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Modules/_asynciomodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3460,6 +3460,7 @@ task_eager_start(_PyThreadStateImpl *ts, asyncio_state *state, TaskObj *task)
34603460
// it will continue as a regular (non-eager) asyncio task
34613461
register_task(ts, task);
34623462

3463+
assert(PyContext_CheckExact(task->task_context));
34633464
if (_PyContext_Enter(&ts->base, task->task_context) == -1) {
34643465
// gh-157301: a failed enter must not leave the task current and registered
34653466
task->task_log_destroy_pending = 0;

0 commit comments

Comments
 (0)