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 <nsof...@redhat.com> Gerrit-Reviewer: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches