[ http://nagoya.apache.org/jira/browse/JELLY-174?page=history ]
Matthias Kerkhoff updated JELLY-174: ------------------------------------ Attachment: WaitForTag.java Small code change which makes onlyWait to act as a strict upper bound for the total time spent waiting on all threads of given thread group. > <threads:waitFor> does not use onlyWait as maximum wait time for thread groups > ------------------------------------------------------------------------------ > > Key: JELLY-174 > URL: http://nagoya.apache.org/jira/browse/JELLY-174 > Project: jelly > Type: Bug > Reporter: Matthias Kerkhoff > Attachments: WaitForTag.java > > Consider > <threads:waitFor group="${tg}" onlyWait="60000" status="SUCCESS"/> > How long will this tag wait at most? Well, it depends. It depends on how many > threads are in the group. The worst case will be onlyWait * tg.size(). Each > thread, however, may not take longer than onlyWait to complete. > From my experience when a timeout like onlyWait is needed, one usually wants > to set an upper limit for the _group_ as a whole. How this timeout is spread > among the threads in the group often doesn't matter. > In the current implementation, the limit is a per-thread timeout even if a > group is specified. > I would suggest a small code change, which changes the behaviour of waitFor > in a way that when a group is specified the timeout specifies the time that > _all_ threads in the group may take to end or to reach the specified status. > The old behaviour can easily be achieved by iterating over each thread in the > group and calling <threads:waitFor> for that thread. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://nagoya.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]