Change in vdsm[master]: lib: Add vdsm.concurrent library

nsoffer at redhat.com nsoffer at redhat.com
Tue Mar 24 13:50:48 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: lib: Add vdsm.concurrent library
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/38464/2/lib/vdsm/concurrent.py
File lib/vdsm/concurrent.py:

Line 23: 
Line 24: log = logging.getLogger("vds.concurrent")
Line 25: 
Line 26: 
Line 27: def tmap(func, iterable):
> I know that this code already exists and is only moved, but currently it is
tmap is very simple, does what I need and easy to maintain. I don't fully understand itamp and I don't want to depend on it or maintain it. It support different use cases (e.g. 100's of "jobs", run by few threads), which are not needed in this case.

For long term, we should move to Python 3 concurrent.futures.Executor.map, eliminating both tmap and itmap:
https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Executor.map

If I had more time for this, I would merge tmap and itmap.
Line 28:     resultsDict = {}
Line 29:     error = [None]
Line 30: 
Line 31:     def wrapper(f, arg, index):


-- 
To view, visit https://gerrit.ovirt.org/38464
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iee90f4c201293c3df048cc4ad7123a837d236a38
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list