summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-11 21:47:40 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-07-11 21:47:40 (GMT)
commit8ebeb03740dad4d9edd65de88f82840a05070941 (patch)
tree6c77cc790d68d27fc85d41ed41991271db2d4ea1 /Lib
parentb28dbac86d3c8ccde7d16c4f2de471eb53a6bffe (diff)
downloadcpython-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')
-rw-r--r--Lib/asyncio/base_events.py4
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.
"""