Groovy concurrency: A better way to aggregate results semantically?
Posted
by Stefan Kendall
on Stack Overflow
See other posts from Stack Overflow
or by Stefan Kendall
Published on 2010-05-18T00:12:07Z
Indexed on
2010/05/18
0:20 UTC
Read the original article
Hit count: 507
I need to call a number of methods in parallel and wait for results. Each relies on different resources, so they may return at different times. I need to wait until I receive all results or time out after a certain amount of time.
I could just spawn threads with a reference to a shared object via a method call, but is there a better, more groovy way to do this?
© Stack Overflow or respective owner