[stdlib-sig] comments on PEP for futures - execute computations asynchronously

Jim Jewett jimjjewett at gmail.com
Sat Nov 7 23:46:25 CET 2009

(1)  It would be helpful to have the API classes named earlier, even
before the examples if the examples take more than three lines (as
they currently do).  The details of what methods they have can come
later, but naming the classes should serve as a useful landmark.

(2)  Within the FutureList methods definitions, please refer to the
FutureList, rather than "the list".  The first few times I came across
that, I was trying to figure out how you knew the container would be a
list, or whether this was a list that the caller had created.  I then
kept trying to view methods like has_exception_futures as global
functions that ought to take a list of futures as an argument.

(3)  Why even have a FutureList?  Can't the Executor object itself act
as a container for the tasks it is executing?  (And you might want a
way to remove tasks from the Executor, short of shutting down the
whole thing.)

(4)  Please add some sort of factory or global function so that users
can say "parallelize this however makes sense" and let the environment
pick.  (For example, Jython would presumably push threads, as would
windows, but Linux implementations might be happier with processes.)


More information about the stdlib-sig mailing list