#217 Fails in <for parallel="true" keepgoing="false">

open
nobody
logic (23)
5
2007-10-26
2007-10-26
Anonymous
No

<for parallel="true" keepgoing="false"> does not stop execution if one of the threads fails.
<parallel> implementation does not use failonany="true" in this case.

Discussion

  • Logged In: YES
    user_id=117164
    Originator: NO

    I've got a patch against trunk for this, but don't see a button for attaching the patch file to the bug. It's trivial, so here it is:

    Index: src/main/java/net/sf/antcontrib/logic/ForTask.java

    --- src/main/java/net/sf/antcontrib/logic/ForTask.java (revision 146)
    +++ src/main/java/net/sf/antcontrib/logic/ForTask.java (working copy)
    @@ -212,6 +212,7 @@
    public void execute() {
    if (parallel) {
    parallelTasks = (Parallel) getProject().createTask("parallel");
    + parallelTasks.setFailOnAny(keepgoing);
    if (threadCount != null) {
    parallelTasks.setThreadCount(threadCount.intValue());
    }

     
  • Logged In: NO

    clheiny,
    There is an error in the code:

    parallel failonany should use reverted ForTask keepgoing value, i.e. if keepgoing is false failonany should be true
    Thanks. Andrey.

     
  • Logged In: YES
    user_id=117164
    Originator: NO

    Hmmmm. I won't be able to look at this until next week, but my guess now is that it should be easy to remedy.