@@ -171,7 +171,8 @@ and work with streams:
171171.. function :: start_unix_server(client_connected_cb, path=None, \
172172 *, limit=None, sock=None, backlog=100, ssl=None, \
173173 ssl_handshake_timeout=None, \
174- ssl_shutdown_timeout=None, start_serving=True, cleanup_socket=True)
174+ ssl_shutdown_timeout=None, start_serving=True, \
175+ cleanup_socket=True, mode=None)
175176 :async:
176177
177178 Start a Unix socket server.
@@ -182,6 +183,9 @@ and work with streams:
182183 be removed from the filesystem when the server is closed, unless the
183184 socket has been replaced after the server has been created.
184185
186+ If *mode * is not ``None ``, the permissions of the Unix socket file
187+ are set to *mode * before the server starts accepting connections.
188+
185189 See also the documentation of :meth: `loop.create_unix_server `.
186190
187191 .. note ::
@@ -205,6 +209,9 @@ and work with streams:
205209 .. versionchanged :: 3.13
206210 Added the *cleanup_socket * parameter.
207211
212+ .. versionchanged :: 3.16
213+ Added the *mode * parameter.
214+
208215
209216StreamReader
210217============
@@ -382,6 +389,16 @@ StreamWriter
382389 be resumed. When there is nothing to wait for, the :meth: `drain `
383390 returns immediately.
384391
392+ .. note ::
393+
394+ When the write buffer is below the high watermark,
395+ :meth: `drain ` returns immediately without yielding to
396+ the event loop. As a result, code which repeatedly calls
397+ ``write() `` followed by ``await drain() `` may prevent other
398+ tasks from running. To prevent blocking behavior, yield
399+ to the event loop explicitly with ``await asyncio.sleep(0) ``
400+ (see :func: `asyncio.sleep `).
401+
385402 .. method :: start_tls(sslcontext, *, server_hostname=None, \
386403 ssl_handshake_timeout=None, ssl_shutdown_timeout=None)
387404 :async:
0 commit comments