Alexander Wels has posted comments on this change.

Change subject: engine, webadmin: synchronous multiple action
......................................................................


Patch Set 4: Verified+1

Last night right as I was going to bed (I have some good thoughts right before 
going to bed) I realized that all of this:

 protected void invokeSyncCommands() {
  //We don't care about the results, since the results will be available in the 
command objects.
  Future<Object> result = ThreadPoolUtil.execute(new FutureTask<Object>(new 
Callable<Object>() {

            @Override
            public Object call() {
                runCommands();
                return null;
            }
        }));
        try {
            //Wait for thread to complete. The result will be in the command 
objects themselves.
            result.get();
        } catch (InterruptedException | ExecutionException e) {
            log.warnFormat("The thread pool failed to execute list of tasks");
            throw new RuntimeException(e);
        }
    }

could be replaced by this:

 protected void invokeSyncCommands() {
  runCommands();
}

Also we already have a parallel action runner which is a sub class of the 
MultipleActionsRunner which overrides runCommands and creates a thread for each 
commands and executes them.

-- 
To view, visit http://gerrit.ovirt.org/23032
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I935f4257e731de719540db9d79d5865537be228d
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to