Rashi,

How to wait for threads until they complete is a general Java question, not a Mason question.  General multithreaded programming is out of the scope of this list.

Of course, perhaps I've misunderstood your question, and you are using something Mason-specific to control your threads.  In that case perhaps you could give us a little more detail about what you're doing and what you'd like to do.

Cheers,

Siggy



On Mon, Oct 12, 2015 at 11:18 AM, Rashi Aswani <[log in to unmask]> wrote:
Hello,

I'm using mason for a simulation having various threads and I'm trying to run the same simulation again with different parameter values. I'm currently using thread.sleep (to pause main thread) before creating one more simulation (in next iteration) so as provide enough time for existing simulation to run.
It would be great to know if there is any other way of handling threads, as the sleep increases runtime to a great extent.
Thanking you in advance.

Regards,
Rashi Aswani




--

Ph.D student in Computer Science, George Mason University
CFO and Web Director, Journal of Mason Graduate Research
http://mason.gmu.edu/~escott8/