aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
authorKumar Aditya <kumaraditya@python.org>2025-02-09 15:57:00 +0530
committerGitHub <noreply@github.com>2025-02-09 15:57:00 +0530
commitd5796e64e061a5366186561d1a003c1436ad3492 (patch)
treed2507e4ec1874081438c815b6409b31d285350d0 /Lib/asyncio/tasks.py
parent6fbf15f98e04f582aeccf5334a94840149ff7cd5 (diff)
downloadcpython-d5796e64e061a5366186561d1a003c1436ad3492.tar.gz
cpython-d5796e64e061a5366186561d1a003c1436ad3492.zip
gh-129874: avoid mixing pure python and C implementation of asyncio (#129875)
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r--Lib/asyncio/tasks.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index a25854cc4bd..2d931040e57 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -245,23 +245,23 @@ class Task(futures._PyFuture): # Inherit Python Task implementation
return self._num_cancels_requested
def __eager_start(self):
- prev_task = _swap_current_task(self._loop, self)
+ prev_task = _py_swap_current_task(self._loop, self)
try:
- _register_eager_task(self)
+ _py_register_eager_task(self)
try:
self._context.run(self.__step_run_and_handle_result, None)
finally:
- _unregister_eager_task(self)
+ _py_unregister_eager_task(self)
finally:
try:
- curtask = _swap_current_task(self._loop, prev_task)
+ curtask = _py_swap_current_task(self._loop, prev_task)
assert curtask is self
finally:
if self.done():
self._coro = None
self = None # Needed to break cycles when an exception occurs.
else:
- _register_task(self)
+ _py_register_task(self)
def __step(self, exc=None):
if self.done():
@@ -273,11 +273,11 @@ class Task(futures._PyFuture): # Inherit Python Task implementation
self._must_cancel = False
self._fut_waiter = None
- _enter_task(self._loop, self)
+ _py_enter_task(self._loop, self)
try:
self.__step_run_and_handle_result(exc)
finally:
- _leave_task(self._loop, self)
+ _py_leave_task(self._loop, self)
self = None # Needed to break cycles when an exception occurs.
def __step_run_and_handle_result(self, exc):