Guido van Rossum added the comment:

That sounds about right -- it's a doc issue. Let me propose a paragraph:

"""
NOTE: It is not safe to share an asyncio event loop between processes that are 
related by os.fork().  If an event loop exists in a process, and that process 
is forked, the only safe operation on the loop in the child process is to call 
its close() method.
"""

(I don't want to have to research what the various polling primitives do on 
fork(), so I don't want to suggest that it's okay to close the loop in the 
parent and use it in the child.)

A similar note should probably be added to the docs for the selectors module.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21998>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to