8000 bpo-46771: Implement task cancel requests by Tinche · Pull Request #31513 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-46771: Implement task cancel requests #31513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Run make regen-all
  • Loading branch information
Tinche committed Feb 24, 2022
commit 532a5be07849bbf11bd09042d635e61dbe8d1b84
6 changes: 3 additions & 3 deletions Modules/_asynciomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2197,7 +2197,7 @@ This also increases the task's count of cancellation requests.

static PyObject *
_asyncio_Task_cancel_impl(TaskObj *self, PyObject *msg)
/*[clinic end generated code: output=c66b60d41c74f9f1 input=f4ff8e8ffc5f1c00]*/
/*[clinic end generated code: output=c66b60d41c74f9f1 input=7bb51bf25974c783]*/
{
self->task_log_tb = 0;

Expand Down Expand Up @@ -2248,7 +2248,7 @@ and may be decremented using .uncancel().

static PyObject *
_asyncio_Task_cancelling_impl(TaskObj *self)
/*[clinic end generated code: output=803b3af96f917d7e input=c50e50f9c3ca4676]*/
/*[clinic end generated code: output=803b3af96f917d7e input=b625224d310cbb17]*/
/*[clinic end generated code]*/
{
return PyLong_FromLong(self->task_num_cancels_requested);
Expand All @@ -2267,7 +2267,7 @@ Returns the remaining number of cancellation requests.

static PyObject *
_asyncio_Task_uncancel_impl(TaskObj *self)
/*[clinic end generated code: output=58184d236a817d3c input=5db95e28fcb6f7cd]*/
/*[clinic end generated code: output=58184d236a817d3c input=68f81a4b90b46be2]*/
/*[clinic end generated code]*/
{
if (self->task_num_cancels_requested > 0) {
Expand Down
19 changes: 9 additions & 10 deletions Modules/clinic/_asynciomodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0