How to wait for thread?
- From: "Brett Romero" <account@xxxxxxxxx>
- Date: 8 Aug 2006 16:53:49 -0700
I'd like the main thread to wait until these three threads have
completed their task:
LoadOjbects lo = new LoadOjbects();
lo.thrd1.Start();
lo.thrd2.Start();
lo.thrd3.Start();
while (lo.thrd1.IsAlive || lo.thrd2.IsAlive || lo.thrd3.IsAlive)
{
Thread.Sleep(500);
}
The above works but adds a lot of time to the overall.
Thanks,
Brett
.
- Follow-Ups:
- Re: How to wait for thread?
- From: Carl Daniel [VC++ MVP]
- Re: How to wait for thread?
- Prev by Date: Re: Resize a textbox at runtime
- Next by Date: Re: How to wait for thread?
- Previous by thread: Difference between...
- Next by thread: Re: How to wait for thread?
- Index(es):