Determine if a thread has been instantiated
-
I am trying to find a way to determine if a thread object has been instantiated. Not if it's been started/stopped/suspended, etc, but instantiated/declared: ie: t = new Thread(new ThreadStart(FSUIPC_Handler)); if(t exists) { t.Start(); } How could I determine if "t" exists?
-
I am trying to find a way to determine if a thread object has been instantiated. Not if it's been started/stopped/suspended, etc, but instantiated/declared: ie: t = new Thread(new ThreadStart(FSUIPC_Handler)); if(t exists) { t.Start(); } How could I determine if "t" exists?
You can write some thing like the following
if(t != null) { t.Start(); }
MCAD
-
I am trying to find a way to determine if a thread object has been instantiated. Not if it's been started/stopped/suspended, etc, but instantiated/declared: ie: t = new Thread(new ThreadStart(FSUIPC_Handler)); if(t exists) { t.Start(); } How could I determine if "t" exists?
Would checking for null help?
t = new Thread(new ThreadStart(FSUIPC_Handler));
if (t != null)
{
...
}Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
You can write some thing like the following
if(t != null) { t.Start(); }
MCAD