What you need is something that holds the reference to each array that you
create. Try a hashtable:
WARNING: The following code is off the top of my head and it is late,..
Might not compile 100% without a bit of tweaking....
Dim threadList as New HashTable
For n = 1 To 10
Dim t As New Thread(New ThreadStart(MyProcedure))
t.Name = "Thread " & Trim(Str(n))
t.Start()
threadList.Add(t.Name, t)
Next n
Now, you should be able to do something like:
Dim isAlive as Boolean
isAlive = DirectCast(threadList.Item("Thread1"), System.Thread).IsAlive
"Jerry Spence1" <je**********@somewhere.com> wrote in message
news:42***********************@ptn-nntp-reader02.plus.net...
I am starting a number of threads as follows:
For n = 1 To 10
Dim t As New Thread(New ThreadStart(MyProcedure))
t.Name = "Thread " & Trim(Str(n))
t.Start()
Next n
I have a timer that, everytime it fired needs to check that all my threads
are running. I am having difficulties using the t.IsAlive property because
't' is not unique to one thread. I feel I need something like
't.name("Thread1").IsAlive'. In other words, "Is thread "Thread1" still
alive?
How can I get a unique reference to each thread that I can then use?
Thanks
-Jerry