Allon Mureinik has posted comments on this change. Change subject: lib: Simplify and generalize concurrent.tmap() ......................................................................
Patch Set 2: Code-Review+1 (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" 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/ 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/ 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/ 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 <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
