Change in vdsm[master]: lib: Simplify and generalize concurrent.tmap()

nsoffer at redhat.com nsoffer at redhat.com
Mon Mar 16 17:12:45 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: lib: Simplify and generalize concurrent.tmap()
......................................................................


Patch Set 2:

(1 comment)

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

Line 36:             results[i] = Result(False, e)
Line 37: 
Line 38:     threads = []
Line 39:     for i, arg in enumerate(args):
Line 40:         t = threading.Thread(target=worker, args=(i, func, arg))
> let me stress again that I'm ok with this patch. This is just a general obs
I think the long term is using concurrent.futures package from Python 3 or the backport for Python 2. This is the minimal solution I need now to avoid duplicating code in fc-scan and multipath-resize (see next patches).
Line 41:         t.daemon = True
Line 42:         t.start()
Line 43:         threads.append(t)
Line 44: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4337db65fe1b326157507b1424a8b4924b91210f
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer 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