[Python-ideas] Better integration of multiprocessing with asyncio
Nick Coghlan
ncoghlan at gmail.com
Sun Jul 27 05:47:49 CEST 2014
On 27 July 2014 13:34, Dan O'Reilly <oreilldf at gmail.com> wrote:
>
> I'm wondering if a complete library providing this kind of behavior for all
> or some subset of multiprocessing is worth adding to the the asyncio module,
> or if you prefer users to deal with this on their own (or perhaps just
> distribute something that provides this behavior as a stand-alone library).
> I suppose adding asyncio-friendly methods to the existing objects in
> multiprocessing is also an option, but I doubt its desirable to add
> asyncio-specific code to modules other than asyncio.
Actually, having asyncio act as a "nexus" for asynchronous IO backends
is one of the reasons for its existence. The asyncio event loop is
pluggable, so making multiprocessing asyncio friendly (whether
directly, or as an addon library that bridges the two) *also* has the
effect of making it compatible with all the other asynchronous event
loops that can be plugged into the asyncio framework.
I'm inclined to agree with Guido, though - while I think making
asyncio and multiprocessing play well together is a good idea in
principle, I think we're still in the "third party exploration phase"
of that integration. Once folks figure out good ways to do it, *then*
we can start talking about making that integration a default part of
Python 3.5 or 3.6+.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas
mailing list