mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
asyncio: Add Transport.is_closing()
See https://github.com/python/asyncio/pull/291 for details.
This commit is contained in:
parent
da32d26ab9
commit
5bb1afb332
11 changed files with 36 additions and 14 deletions
|
@ -19,6 +19,10 @@ class BaseTransport:
|
|||
"""Get optional transport information."""
|
||||
return self._extra.get(name, default)
|
||||
|
||||
def is_closing(self):
|
||||
"""Return True if the transport is closing or closed."""
|
||||
raise NotImplementedError
|
||||
|
||||
def close(self):
|
||||
"""Close the transport.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue