Moti Asayag has posted comments on this change. Change subject: core: Adding support for completion service for ThreadPoolUtil ......................................................................
Patch Set 1: (3 inline comments) .................................................... File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/threadpool/ThreadPoolUtil.java Line 75: * Creates a completion service to allow launching of tasks (callable objects) Line 76: * concurrently, and use a blocking queue like interface to get the tasks Line 77: * execution results Line 78: * @return Line 79: */ 1. if all the use of this method is to instantiate the same way the ExecutorCompletionService, do we really need it ? It can be inline where it's needed. If you think otherwise, a better name for this method would be createCompletionService. Line 80: public static <V> ExecutorCompletionService<V> getCompletionService() { Line 81: ExecutorCompletionService<V> ecs = new ExecutorCompletionService<V>(es); Line 82: return ecs; Line 83: } Line 77: * execution results Line 78: * @return Line 79: */ Line 80: public static <V> ExecutorCompletionService<V> getCompletionService() { Line 81: ExecutorCompletionService<V> ecs = new ExecutorCompletionService<V>(es); you can unified/inline those lines into a single line. Line 82: return ecs; Line 83: } Line 84: Line 85: /** Line 92: ExecutorCompletionService<V> ecs = getCompletionService(); Line 93: if (tasks == null) { Line 94: return ecs; Line 95: } Line 96: for (Callable<V> callable:tasks) { there should be space before and after the colons Line 97: ecs.submit(callable); Line 98: } Line 99: return ecs; Line 100: } -- To view, visit http://gerrit.ovirt.org/10439 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If806302ecf028a5db1c9726a407a1643b5c000b6 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches