Hi
I am getting a thread.Start exception using V4.1 on Fez Cobra, any ideas?
I run 4 separate threads this way, I have a watchdog that can call Start()
to restart the thread if need be - but this error occurs on first pass at startup.
public bool Start()
{
bool bRet = false;
try
{
if (P.APPL.moThread == null)
{
//start thread main, use bContinue semaphore to stop it
P.APPL.moThreadMain = new ThreadStart(Do);
P.APPL.moThread = new Thread(P.APPL.moThreadMain);
Thread.Sleep(1000);
}
if (!P.APPL.moThread.IsAlive) <<<<<< Thread.IsAlive is False
{
P.APPL.moThread.Start(); <<<<<<< Exception generated here
}
bRet = true;
}
catch (Exception Ex)
{
DBG.Print("A.Start(), Ex=" + Ex.ToString());
}
return bRet;
}