Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

distinguish unstarted and completed threads viaThread.IsAlive

$
0
0

When a thread is newly created it looks like this

IsAlive = false

while it's running, obviously it looks like this

IsAlive = true

and when its finished

IsAlive = false 

Now, assuming I have a plain list of threads, is there any built-in way to detect if a thread that isn't alive is a thread that has been started or a thread that ran to completion without resorting to ThreadState == ThreadState.Unstarted? Going the Task route is no option for multiple tasks can eventually share one thread which would lead to disaster in my scenario.


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>