diff options
Diffstat (limited to 'Modules/clinic/_asynciomodule.c.h')
-rw-r--r-- | Modules/clinic/_asynciomodule.c.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Modules/clinic/_asynciomodule.c.h b/Modules/clinic/_asynciomodule.c.h index 5648e14..2b84ef0 100644 --- a/Modules/clinic/_asynciomodule.c.h +++ b/Modules/clinic/_asynciomodule.c.h @@ -414,7 +414,9 @@ PyDoc_STRVAR(_asyncio_Task_cancel__doc__, "not return True (unless the task was already cancelled). A\n" "task will be marked as cancelled when the wrapped coroutine\n" "terminates with a CancelledError exception (even if cancel()\n" -"was not called)."); +"was not called).\n" +"\n" +"This also increases the task\'s count of cancellation requests."); #define _ASYNCIO_TASK_CANCEL_METHODDEF \ {"cancel", (PyCFunction)(void(*)(void))_asyncio_Task_cancel, METH_FASTCALL|METH_KEYWORDS, _asyncio_Task_cancel__doc__}, @@ -451,13 +453,10 @@ PyDoc_STRVAR(_asyncio_Task_cancelling__doc__, "cancelling($self, /)\n" "--\n" "\n" -"Return True if the task is in the process of being cancelled.\n" -"\n" -"This is set once .cancel() is called\n" -"and remains set until .uncancel() is called.\n" +"Return the count of the task\'s cancellation requests.\n" "\n" -"As long as this flag is set, further .cancel() calls will be ignored,\n" -"until .uncancel() is called to reset it."); +"This count is incremented when .cancel() is called\n" +"and may be decremented using .uncancel()."); #define _ASYNCIO_TASK_CANCELLING_METHODDEF \ {"cancelling", (PyCFunction)_asyncio_Task_cancelling, METH_NOARGS, _asyncio_Task_cancelling__doc__}, @@ -475,12 +474,12 @@ PyDoc_STRVAR(_asyncio_Task_uncancel__doc__, "uncancel($self, /)\n" "--\n" "\n" -"Reset the flag returned by cancelling().\n" +"Decrement the task\'s count of cancellation requests.\n" "\n" "This should be used by tasks that catch CancelledError\n" "and wish to continue indefinitely until they are cancelled again.\n" "\n" -"Returns the previous value of the flag."); +"Returns the remaining number of cancellation requests."); #define _ASYNCIO_TASK_UNCANCEL_METHODDEF \ {"uncancel", (PyCFunction)_asyncio_Task_uncancel, METH_NOARGS, _asyncio_Task_uncancel__doc__}, @@ -918,4 +917,4 @@ _asyncio__leave_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=c02708a9d6a774cc input=a9049054013a1b77]*/ +/*[clinic end generated code: output=344927e9b6016ad7 input=a9049054013a1b77]*/ |