Click here to Skip to main content
16,011,804 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralConverting to System::Object _gc * _gc * Pin
Mirdous25-Sep-04 1:36
Mirdous25-Sep-04 1:36 
GeneralAlternative for while loop in threads Pin
ledallam25-Sep-04 1:32
ledallam25-Sep-04 1:32 
GeneralRe: Alternative for while loop in threads Pin
Andrzej Markowski25-Sep-04 4:59
Andrzej Markowski25-Sep-04 4:59 
GeneralRe: Alternative for while loop in threads Pin
ledallam27-Sep-04 20:51
ledallam27-Sep-04 20:51 
GeneralRe: Alternative for while loop in threads Pin
Andrzej Markowski28-Sep-04 7:40
Andrzej Markowski28-Sep-04 7:40 
GeneralRe: Alternative for while loop in threads Pin
ledallam28-Sep-04 18:09
ledallam28-Sep-04 18:09 
GeneralRe: Alternative for while loop in threads Pin
JimmyRopes25-Sep-04 16:51
professionalJimmyRopes25-Sep-04 16:51 
GeneralThread - check continously Pin
ledallam25-Sep-04 0:25
ledallam25-Sep-04 0:25 
Hello,

In my project, I have to check if a particular file is updated and take some action accordingly. Hence I have started a thread which continously checks for file update ashown below:

UINT CheckFileUpdates(LPVOID lp)
{
while(TRUE)
{
CFile::GetStatus(pView->m_LogFilePath,st);
//code for checking the status of file
// take some action when the file is updated
// in this case send the added new line to destination
}
}

This thread should be started at application start up and should run continously till the application is closed.

Since I used While(TRUE) to check continously the status, the application is becoming slowler. Is there any other way to make the thread continously check the status without using while loop.

Can anyone please guide me ?

Thanks
Madhavi

GeneralRe: Thread - check continously Pin
Brad Bruce25-Sep-04 1:21
Brad Bruce25-Sep-04 1:21 
GeneralRe: Thread - check continously Pin
JimmyRopes25-Sep-04 4:59
professionalJimmyRopes25-Sep-04 4:59 
QuestionWindow class in Dll. Help me to find the problem ? Pin
AlexanderKhilko25-Sep-04 0:22
AlexanderKhilko25-Sep-04 0:22 
GeneralOpen Dialog problem Pin
Plons24-Sep-04 23:27
Plons24-Sep-04 23:27 
GeneralRe: Open Dialog problem Pin
Gary R. Wheeler25-Sep-04 2:33
Gary R. Wheeler25-Sep-04 2:33 
GeneralRe: Open Dialog problem Pin
Plons26-Sep-04 5:29
Plons26-Sep-04 5:29 
Generalhidding a file for good Pin
gamitech24-Sep-04 23:27
gamitech24-Sep-04 23:27 
GeneralRe: hidding a file for good Pin
Brian Delahunty25-Sep-04 0:12
Brian Delahunty25-Sep-04 0:12 
GeneralRe: hidding a file for good Pin
Moak26-Sep-04 23:15
Moak26-Sep-04 23:15 
GeneralEN_CHANGE Pin
gamitech24-Sep-04 23:06
gamitech24-Sep-04 23:06 
GeneralRe: EN_CHANGE Pin
Andrzej Markowski24-Sep-04 23:44
Andrzej Markowski24-Sep-04 23:44 
GeneralRe: EN_CHANGE Pin
Andrzej Markowski3-Oct-04 16:31
Andrzej Markowski3-Oct-04 16:31 
Generalproblem with NT service Pin
JimmyRopes24-Sep-04 23:04
professionalJimmyRopes24-Sep-04 23:04 
GeneralRe: problem with NT service Pin
ThatsAlok24-Sep-04 23:26
ThatsAlok24-Sep-04 23:26 
GeneralRe: problem with NT service Pin
JimmyRopes25-Sep-04 3:38
professionalJimmyRopes25-Sep-04 3:38 
GeneralRe: problem with NT service Pin
Blake Miller27-Sep-04 12:18
Blake Miller27-Sep-04 12:18 
GeneralRe: problem with NT service Pin
JimmyRopes27-Sep-04 18:45
professionalJimmyRopes27-Sep-04 18:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.