diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-07-11 21:47:40 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-07-11 21:47:40 (GMT) |
commit | 8ebeb03740dad4d9edd65de88f82840a05070941 (patch) | |
tree | 6c77cc790d68d27fc85d41ed41991271db2d4ea1 /Lib/asyncio | |
parent | b28dbac86d3c8ccde7d16c4f2de471eb53a6bffe (diff) | |
download | cpython-8ebeb03740dad4d9edd65de88f82840a05070941.zip cpython-8ebeb03740dad4d9edd65de88f82840a05070941.tar.gz cpython-8ebeb03740dad4d9edd65de88f82840a05070941.tar.bz2 |
asyncio: improve the documentation of servers
- Fix the documentation of Server.close(): it closes sockets
- Replace AbstractServer with Server
- Document Server.sockets attribute
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/base_events.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 10996d2..cab4462 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -110,6 +110,8 @@ class Server(events.AbstractServer): return self.sockets = None for sock in sockets: + # closing sockets will call asynchronously the _detach() method + # which calls _wakeup() for the last socket self._loop._stop_serving(sock) if self._active_count == 0: self._wakeup() @@ -626,7 +628,7 @@ class BaseEventLoop(events.AbstractEventLoop): reuse_address=None): """Create a TCP server bound to host and port. - Return an AbstractServer object which can be used to stop the service. + Return an Server object which can be used to stop the service. This method is a coroutine. """ |