Go4Expert

Go4Expert (http://www.go4expert.com/)
-   MFC (http://www.go4expert.com/forums/mfc/)
-   -   thread problem (http://www.go4expert.com/forums/thread-problem-t21629/)

answerme 2Apr2010 10:48

thread problem
 
I have created 2 thread In one thread iam reading data through serial.once it read it will go to the second thread.But It seems it never comes out of the first thread itself(read_gps).

my program goes like this

Code:

void CScenGenDoc::OnControlSerialin()
{
        upwin=true;       
        LPVOID param= NULL;
        LPVOID para=NULL;
        int a;
       
 GPS_READ =::CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)read_gps(),(LPVOID) param, 0,NULL);
  GPS_PARSE =::CreateThread(NULL, 0,(LPTHREAD_START_ROUTINE)frameparse(),(LPVOID) para, 0,NULL);
       
}



Code:

int read_gps()
{
while(1)
{
bool read=true;
}

}

Code:

int frameparse()
{
while(1)
{
if(read==true)
{
----
----
}
}



All times are GMT +5.5. The time now is 14:29.