Author F.D. Sacerdoti
Recipients F.D. Sacerdoti
Date 2016-02-17.12:26:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

My colleague and I have both written parallel executors for the concurrent_futures module, and are having an argument, as described in the dialog below. To resolve, I would like to add "order of results is undefined" to disambiguate the docs for "map(func, *iterables, timeout=None)".


Q: Correct Semantics to return results out of order?
JH: No, breaks API as stated
Rebut: order is undefined, concurrent_futures specifies map() returns an iterator, where builtin map returns a list. 
Q: Does it break the spirit of the module?
A: No, I believe one of the best things about doing things async is the dataflow model: do the next thing as soon as its inputs are ready.
 Q: Should we hold up the caller in all cases when there are stragglers, i.e. elements that compute slower?
 A: No, the interface should allow both modes.

def james_map(exe, fn, *args):
  return iter( sorted( list( fn, *args ) ) ) )
Date User Action Args
2016-02-17 12:26:30F.D. Sacerdotisetrecipients: + F.D. Sacerdoti
2016-02-17 12:26:30F.D. Sacerdotisetmessageid: <>
2016-02-17 12:26:30F.D. Sacerdotilinkissue26374 messages
2016-02-17 12:26:28F.D. Sacerdoticreate