Change in vdsm[master]: lib: Simplify and generalize concurrent.tmap()
nsoffer at redhat.com
nsoffer at redhat.com
Sun Mar 22 20:15:42 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: lib: Simplify and generalize concurrent.tmap()
......................................................................
Patch Set 2:
(4 comments)
https://gerrit.ovirt.org/#/c/38465/2//COMMIT_MSG
Commit Message:
Line 5: CommitDate: 2015-03-16 02:11:13 +0200
Line 6:
Line 7: lib: Simplify and generalize concurrent.tmap()
Line 8:
Line 9: The previous version had few issues:
> "The previous version of tmap"
Done
Line 10:
Line 11: - Used non-daemon threads, so the caller application may be blocked on
Line 12: shutdown if a mapped function get stuck.
Line 13: - Assumed that mapped functions do not raise, limiting the usefulness of
Line 8:
Line 9: The previous version had few issues:
Line 10:
Line 11: - Used non-daemon threads, so the caller application may be blocked on
Line 12: shutdown if a mapped function get stuck.
> s/get/got/
Done
Line 13: - Assumed that mapped functions do not raise, limiting the usefulness of
Line 14: this utility.
Line 15: - Logged exceptions for functions that do raise - libraries should not
Line 16: log behind you back.
Line 13: - Assumed that mapped functions do not raise, limiting the usefulness of
Line 14: this utility.
Line 15: - Logged exceptions for functions that do raise - libraries should not
Line 16: log behind you back.
Line 17: - Drop all errors but the last one, so the caller cannot handle them.
> keep consistent tenses: s/Drop/Dropped/, s/cannot/could not/
Done
Line 18: - Assume that all errors are equal, and raise the last error.
Line 19:
Line 20: This version fixes these issues by making tmap() simpler and more
Line 21: generic. The function is mapped to the values, and the result is a 2
Line 14: this utility.
Line 15: - Logged exceptions for functions that do raise - libraries should not
Line 16: log behind you back.
Line 17: - Drop all errors but the last one, so the caller cannot handle them.
Line 18: - Assume that all errors are equal, and raise the last error.
> keep consistent tenses: s/Assume/Assumed/, s/raise/raised/
Done
Line 19:
Line 20: This version fixes these issues by making tmap() simpler and more
Line 21: generic. The function is mapped to the values, and the result is a 2
Line 22: namedtuple (succeeded, value), holding either the result of the
--
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