[Python-Dev] [PEP 3148] futures - execute computations asynchronously

Jesse Noller jnoller at gmail.com
Sun Mar 7 14:50:03 CET 2010


On Sat, Mar 6, 2010 at 10:09 PM, Dj Gilcrease <digitalxero at gmail.com> wrote:
> After playing with the API for a while & running into many issues with
> the examples & tests crashing windows I decided to modify the API a
> little and fix up the examples so they dont crash windows based
> computers.
>
> http://code.google.com/p/pythonfutures/issues/detail?id=1
>
> API Change that changes the current Executor to ExecutorBase and
> adds a new Executor class that is used like
>
> futures.Executor() # creates an executor that uses threading and a
> max_workers = to the number of cpus
>
> futures.Executor(use='process') # Creates an executor that uses
> multiprocessing and a max_workers = to the number of cpus
>
> futures.Executor(max_workers=5) # threading again, just specifying the
> number of workers
>
> futures.Executor(use='process', max_workers=5) # back to multiprocessing,
> but with the max_workers specified

Making the tests and examples happy on windows is fine; but some
explanation is needed for the API changes.


More information about the Python-Dev mailing list