Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#33 limit number of threads in ForEach - parallel

closed
nobody
None
5
2003-11-25
2003-06-01
Oded Noam
No

There is a problem when running foreach with
parallel="true" when there are too many tasks running,
and they are heavy. Ant 1.6 has
the "threadsPerProcessor" property which enables to
limit the number of running threads; I think the ForEach
task should have the option to use this property.

I already have a patched source with this fix, only needs
to be submitted into cvs.

Discussion

  • Oded Noam
    Oded Noam
    2003-06-01

     
    Attachments
  • Matt Inger
    Matt Inger
    2003-11-25

    • status: open --> closed
     
  • Matt Inger
    Matt Inger
    2003-11-25

    Logged In: YES
    user_id=83032

    I have added a "maxThreads" attribute (default of 5). We try
    to take advantage of the 1.6 features. however, if we can't
    what we'll do is to run as many as is allowed by maxthreads.
    When all those finish, we'll kick off another batch to run. So
    they will run in groups, as opposed to 1.6 where when one
    finishes, the next one is allowed to start.

    Get the latest source code from cvs for this change.