New submission from F.D. Sacerdoti: 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 ) ) ) ) ---------- messages: 260396 nosy: F.D. Sacerdoti priority: normal severity: normal status: open title: concurrent_futures Executor.map semantics better specified in docs type: enhancement versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26374> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com