T
tshad
I have an ArrayList of thread pointers that I want delete from my list when
the Thread in not alive and status is stopped. But I want to do it from the
foreach loop I am looping through. threadList is the ArrayList.
foreach (Thread theThread in threadList)
{
if ((!theThread.IsAlive) && (theThread.ThreadState.ToString ==
"Stopped"))
sw.WriteLine(" Status for Thread: {0} is {1} IsAlive: {2}",
theThread.Name, theThread.ThreadState,theThread.IsAlive);
// this is where I want to take the pointer out of the list - something
like threadList.current.remove.
}
Thanks,
Tom
the Thread in not alive and status is stopped. But I want to do it from the
foreach loop I am looping through. threadList is the ArrayList.
foreach (Thread theThread in threadList)
{
if ((!theThread.IsAlive) && (theThread.ThreadState.ToString ==
"Stopped"))
sw.WriteLine(" Status for Thread: {0} is {1} IsAlive: {2}",
theThread.Name, theThread.ThreadState,theThread.IsAlive);
// this is where I want to take the pointer out of the list - something
like threadList.current.remove.
}
Thanks,
Tom