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

Dj Gilcrease digitalxero at gmail.com
Sun Mar 7 04:09:59 CET 2010

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


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

More information about the Python-Dev mailing list