mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
Reflect 'context' arg in 'AbstractEventLoop.call_*()' methods (GH-30427)
This commit is contained in:
parent
3db762db72
commit
3e43fac250
@ -257,13 +257,13 @@ class AbstractEventLoop:
|
||||
"""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):
|
||||
@ -279,7 +279,7 @@ class AbstractEventLoop:
|
||||
|
||||
# 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…
Reference in New Issue
Block a user