Dear All,
How can I wait for multiple threads to finish in .Net Compact Framework?

In full .Net Framework we have Thread.join() method which we can call to
wait for the thread to finish but in .Net CF it is simply not available. Can
anyone tell me the alternative of Thread.join() method in .Net CF.

I shall be very thankfull.
regards,
Faraz

Re: Waiting for multiple threads to finish by Mike

Mike
Wed Feb 25 03:36:32 CST 2004

Hi,

you could perhaps get the thread you're wanting to join with to hold a
mutex that it releases just before it completes. You could then wait on
the mutex to be released.

Not particularly elegant, but it should work :)

Mike

Faraz Hussain wrote:
> Dear All,
> How can I wait for multiple threads to finish in .Net Compact Framework?
>
> In full .Net Framework we have Thread.join() method which we can call to
> wait for the thread to finish but in .Net CF it is simply not available. Can
> anyone tell me the alternative of Thread.join() method in .Net CF.
>
> I shall be very thankfull.
> regards,
> Faraz
>
>

Re: Waiting for multiple threads to finish by Milosz

Milosz
Wed Feb 25 04:16:10 CST 2004

you can put your thread method in a separate class and at the end of the
thread you should rise an event
--> implementation with callback

regards

Milosz


--
-> Milosz Weckowski
www.playseven.com

mailto:mw@playseven.com
ICQ Number: 84867613

Get the enhanced Progressbar and a fine Colorpicker for the Compact Framwork
for free:
http://www.playseven.com/11620/p7_Controls.html


"Faraz Hussain" <faraz_hs@hotmail.com> schrieb im Newsbeitrag
news:umrEGX3%23DHA.2636@TK2MSFTNGP09.phx.gbl...
> Dear All,
> How can I wait for multiple threads to finish in .Net Compact Framework?
>
> In full .Net Framework we have Thread.join() method which we can call to
> wait for the thread to finish but in .Net CF it is simply not available.
Can
> anyone tell me the alternative of Thread.join() method in .Net CF.
>
> I shall be very thankfull.
> regards,
> Faraz
>
>



Re: Waiting for multiple threads to finish by Ginny

Ginny
Thu Feb 26 21:59:34 CST 2004

Faraz,

You could use a global variable that is incremented as each worker thread
starts and decremented when each thread ends. When it reaches zero, you're
done.
--
Ginny Caughey
.Net Compact Framework MVP

"Faraz Hussain" <faraz_hs@hotmail.com> wrote in message
news:umrEGX3%23DHA.2636@TK2MSFTNGP09.phx.gbl...
> Dear All,
> How can I wait for multiple threads to finish in .Net Compact Framework?
>
> In full .Net Framework we have Thread.join() method which we can call to
> wait for the thread to finish but in .Net CF it is simply not available.
Can
> anyone tell me the alternative of Thread.join() method in .Net CF.
>
> I shall be very thankfull.
> regards,
> Faraz
>
>



Re: Waiting for multiple threads to finish by Asheesh

Asheesh
Fri Feb 27 03:04:32 CST 2004

Hi Faraz,

Take a look at this link..
http://msdn.microsoft.com/library/en-us/dncfhowto/html/stopmt.asp

This article shows how to stop multiple threads, and uses the way pointed
out by Ginny.

HTH,
Asheesh
"Ginny Caughey [MVP]" <ginny.caughey.online@wasteworks.com> wrote in message
news:u5PldYO$DHA.4012@tk2msftngp13.phx.gbl...
> Faraz,
>
> You could use a global variable that is incremented as each worker thread
> starts and decremented when each thread ends. When it reaches zero, you're
> done.
> --
> Ginny Caughey
> .Net Compact Framework MVP
>
> "Faraz Hussain" <faraz_hs@hotmail.com> wrote in message
> news:umrEGX3%23DHA.2636@TK2MSFTNGP09.phx.gbl...
> > Dear All,
> > How can I wait for multiple threads to finish in .Net Compact Framework?
> >
> > In full .Net Framework we have Thread.join() method which we can call to
> > wait for the thread to finish but in .Net CF it is simply not available.
> Can
> > anyone tell me the alternative of Thread.join() method in .Net CF.
> >
> > I shall be very thankfull.
> > regards,
> > Faraz
> >
> >
>
>