Is there any way to get unit3.thread() to run after the other two threads?
run() is also
{
start unit1.thread();
start unit2.thread();
unit3.thread();
};
I would like threads in unit 1 and 2 to run in parallel and for thread 3 to run after they have both completed. However since run() is not a time consuming method solutions such as:
all of
{
{
unit1.thread();
};
{
unit2.thread();
}
};
unit3.thread();
Are not allowed.
Is there any way to make unit3.thread() wait until the previous threads are finished?