mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
Reflect 'context' arg in 'AbstractEventLoop.call_*()' methods (GH-30427) (#30429)
(cherry picked from commit 3e43fac250)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
This commit is contained in:
parent
64199e9235
commit
0aa8bbfe1e
2 changed files with 6 additions and 4 deletions
|
|
@ -258,13 +258,13 @@ def _timer_handle_cancelled(self, handle):
|
|||
"""Notification that a TimerHandle has been cancelled."""
|
||||
raise NotImplementedError
|
||||
|
||||
def call_soon(self, callback, *args):
|
||||
def call_soon(self, callback, *args, context=None):
|
||||
return self.call_later(0, callback, *args)
|
||||
|
||||
def call_later(self, delay, callback, *args):
|
||||
def call_later(self, delay, callback, *args, context=None):
|
||||
raise NotImplementedError
|
||||
|
||||
def call_at(self, when, callback, *args):
|
||||
def call_at(self, when, callback, *args, cotext=None):
|
||||
raise NotImplementedError
|
||||
|
||||
def time(self):
|
||||
|
|
@ -280,7 +280,7 @@ def create_task(self, coro, *, name=None):
|
|||
|
||||
# Methods for interacting with threads.
|
||||
|
||||
def call_soon_threadsafe(self, callback, *args):
|
||||
def call_soon_threadsafe(self, callback, *args, context=None):
|
||||
raise NotImplementedError
|
||||
|
||||
def run_in_executor(self, executor, func, *args):
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
Reflect ``context`` argument in ``AbstractEventLoop.call_*()`` methods. Loop
|
||||
implementations already support it.
|
||||
Loading…
Add table
Add a link
Reference in a new issue