Yaniv Bronhaim has posted comments on this change. Change subject: Adding threads limitation to misc.tmap ......................................................................
Patch Set 8: Not sure about that, tmap returns after all threads are done or raise exception if one of them fails. In itmap we act different, we yeild each time only one thread result, and if its exception, the caller should check the value and distinguish that. tmap much more intuitive, keeping the order, and process all operations before returning (wait with join on all threads). Nobody uses tmap, but we see a call to itmap that wants to get each finished thread as fast as possible. The implementation is too different to reuse: 1. itmap puts the exception inside the queue 2. tmap reads and keep args order by using the queue 3. tmap waits on all threads 4. itmap yield result instead returning all together I don't know if we will ever see a use in tmap, but reuse doesn't seem helpful here. Unless we change tmap to yeild the result as itmap does, and treat exception as return value, then we can reuse itmap code. -- 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: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: ShaoHe Feng <[email protected]> Gerrit-Reviewer: Shu Ming <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
