Change in vdsm[master]: Adding threads limitation to misc.tmap
zhshzhou at linux.vnet.ibm.com
zhshzhou at linux.vnet.ibm.com
Thu Nov 1 08:11:31 UTC 2012
Zhou Zheng Sheng has posted comments on this change.
Change subject: Adding threads limitation to misc.tmap
......................................................................
Patch Set 7: I would prefer that you didn't submit this
(1 inline comment)
Just one suggestion. The rest of the code looks good.
....................................................
File vdsm/storage/misc.py
Line 1097: if maxthreads < 1 and maxthreads != UNLIMITED_THREADS:
Line 1098: raise ValueError("Wrong input passed to function tmap: %s", maxthreads)
Line 1099:
Line 1100: resultsDict = {}
Line 1101: tmap.error = None
I think tmap.error is like a static variable in C. If there are two parallel calls to tmap, they will override each other's tmap.error.
I am for the "error = [None]" trick. It just needs a simple comment.
Line 1102:
Line 1103: def wrapper(f, arg, index):
Line 1104: try:
Line 1105: resultsDict[index] = f(arg)
--
To view, visit http://gerrit.ovirt.org/8858
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I07845bfd78b9215e8994ac2ebe46a7ff78c85625
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
Gerrit-Reviewer: Shu Ming <shuming at linux.vnet.ibm.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
More information about the vdsm-patches
mailing list