threading

H

hharry

Hello All,

I have designed an application with one UI thread which spawns one
thread (THREAD 1). When THREAD 1 completes an event is sent to the UI
signalling that the thread has completed.

For performance reasons, I need to increase the number of threads. I
now have one UI thread which spawns one thread (THREAD 1). THREAD 1
spawns 3 threads (SUB THREAD 1, SUB THREAD 2, SUB THREAD 3).

I need SUB THREAD 1, SUB THREAD 2 and SUB THREAD 3 all to complete
prior to THREAD 1 completing.
What is the best way to do this ?

Pointers appreciated
Thanks
hharry
 
J

Jon Skeet [C# MVP]

hharry said:
I have designed an application with one UI thread which spawns one
thread (THREAD 1). When THREAD 1 completes an event is sent to the UI
signalling that the thread has completed.

For performance reasons, I need to increase the number of threads. I
now have one UI thread which spawns one thread (THREAD 1). THREAD 1
spawns 3 threads (SUB THREAD 1, SUB THREAD 2, SUB THREAD 3).

I need SUB THREAD 1, SUB THREAD 2 and SUB THREAD 3 all to complete
prior to THREAD 1 completing.
What is the best way to do this ?

Have a look at Thread.Join.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top