[Python-ideas] Executor Docs [was: Re: Add an introspection API to Executor]

Antoine Pitrou antoine at python.org
Tue Aug 26 06:37:52 CEST 2014


Le 26/08/2014 00:22, Ethan Furman a écrit :
>
> I went in search of docs to see what the API actually was, and while I
> know the source code is a great place to go look for education and finer
> points, should we have to go looking there just to see what the __init__
> parameters are?

So, you didn't find the docs?

https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor

"""
class concurrent.futures.ThreadPoolExecutor(max_workers)

     An Executor subclass that uses a pool of at most max_workers 
threads to execute calls asynchronously.
"""

https://docs.python.org/3/library/concurrent.futures.html#processpoolexecutor

"""
class concurrent.futures.ProcessPoolExecutor(max_workers=None)

     An Executor subclass that executes calls asynchronously using a 
pool of at most max_workers processes. If max_workers is None or not 
given, it will default to the number of processors on the machine.
"""

Regards

Antoine.




More information about the Python-ideas mailing list