Martin Vanyavchich wrote:Hey ranchers!
I have a situation where I call several WebServices that take long time to return. Threads came to mind. In some cases though I need the returned values right after the call. Does it make any sense to make a Thread, start it and then call join() straight away, waiting for results. Are there any benefits doing it this way or is it just clutter?
Thank you.
Hi Martin,
Looking at your problem, i have same problem. As such its look like all your web services are independent of each other. What you need to do is to create array of thread objects, and start all thread in loop. So all parallel call will be initiated. And after this loop. Write another loop to iterate this array of thread and call join on every thread. So parallelism is achieved.