This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <1455711990.13.0.290959896018.issue26374@psf.upfronthosting.co.za>
In-reply-to
Content
Hello,

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)".

DISCUSSION

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( exe.map( fn, *args ) ) ) )
History
Date User Action Args
2016-02-17 12:26:30F.D. Sacerdotisetrecipients: + F.D. Sacerdoti
2016-02-17 12:26:30F.D. Sacerdotisetmessageid: <1455711990.13.0.290959896018.issue26374@psf.upfronthosting.co.za>
2016-02-17 12:26:30F.D. Sacerdotilinkissue26374 messages
2016-02-17 12:26:28F.D. Sacerdoticreate