classification
Title: concurrent.futures.Executor.map is not equivalent to map.
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: bquinlan, majkrzak
Priority: normal Keywords:

Created on 2015-01-21 12:42 by majkrzak, last changed 2015-03-19 03:03 by ned.deily.

Messages (1)
msg234433 - (view) Author: Piotr Majkrzak (majkrzak) Date: 2015-01-21 12:42
In documentation https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Executor.map is writen that this fucntion is equivalent to the builtin map. But it is not true due to the fact that it is not lazy evalueded. The reason is in https://hg.python.org/cpython/file/0893b9ee44ea/Lib/concurrent/futures/_base.py#l548 where the full list of features is created.

I don't find any reasonable solutions, but in my case following code was suitable.
https://gist.github.com/06bbd83eccd4083c68d0
History
Date User Action Args
2015-03-19 03:03:56ned.deilysetnosy: + bquinlan

versions: - Python 3.2, Python 3.3, Python 3.4, Python 3.6
2015-01-21 12:43:00majkrzakcreate