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 <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches