I have the following code in a windows service, when I start the windows
service process1 and process2 work fine , but final process (3) doesnt get
called. i stop and restart the windows service and the final process(3) gets
called. what am I doing wrong with the threading? by the way
Directory.GetFiles(IncomingXMLPath1).Length is some global outcome from
process 1.
Thanks
1)
m_threadNewClaimInstitutional = new Thread(new
System.Threading.ThreadStart(process1));
m_threadNewClaimInstitutional.Start();
2)
m_ThreadNewClaimProfessional= new Thread(new
System.Threading.ThreadStart(process2));
m_ThreadNewClaimProfessional.Start();
//when all the files have been processed in both the process1 and process2
directories
//then is the final process
#)final
if(Directory.GetFiles(IncomingXMLPath1).Length==0 &&
Directory.GetFiles(IncomingXMLPath2).Length==0)
{
m_ThreadFinall = new Thread(new System.Threading.ThreadStart(process3));
m_ThreadFinall.Start();
}
Leer las respuestas