3 years back I wrote like this :)
-
During starting my career as VC programmer and my first multithread program I used the while loop and global variable to wait for thread to finish.:laugh: I always recall it when ever I write WaitForSingleObject after that. :-D
DWORD dwStart = GetTickCount(); while( m_sManagerNode.IsEmpty() == FALSE ){ if( GetTickCount() - dwStart >= 60000 ){ bReturn = FALSE; break; } } return( TRUE );
Regards Anil
-
During starting my career as VC programmer and my first multithread program I used the while loop and global variable to wait for thread to finish.:laugh: I always recall it when ever I write WaitForSingleObject after that. :-D
DWORD dwStart = GetTickCount(); while( m_sManagerNode.IsEmpty() == FALSE ){ if( GetTickCount() - dwStart >= 60000 ){ bReturn = FALSE; break; } } return( TRUE );
Regards Anil
:laugh::laugh::laugh:
Regards, Sylvester G sylvester_g_m@yahoo.com
-
During starting my career as VC programmer and my first multithread program I used the while loop and global variable to wait for thread to finish.:laugh: I always recall it when ever I write WaitForSingleObject after that. :-D
DWORD dwStart = GetTickCount(); while( m_sManagerNode.IsEmpty() == FALSE ){ if( GetTickCount() - dwStart >= 60000 ){ bReturn = FALSE; break; } } return( TRUE );
Regards Anil
-
During starting my career as VC programmer and my first multithread program I used the while loop and global variable to wait for thread to finish.:laugh: I always recall it when ever I write WaitForSingleObject after that. :-D
DWORD dwStart = GetTickCount(); while( m_sManagerNode.IsEmpty() == FALSE ){ if( GetTickCount() - dwStart >= 60000 ){ bReturn = FALSE; break; } } return( TRUE );
Regards Anil
-
During starting my career as VC programmer and my first multithread program I used the while loop and global variable to wait for thread to finish.:laugh: I always recall it when ever I write WaitForSingleObject after that. :-D
DWORD dwStart = GetTickCount(); while( m_sManagerNode.IsEmpty() == FALSE ){ if( GetTickCount() - dwStart >= 60000 ){ bReturn = FALSE; break; } } return( TRUE );
Regards Anil
I think it already happened to everyone to rewrite existing code or API just because one did not know that the code already existed. In a different manner, as I was a student, it took me one week to transform serial signals (-12/+12 Volts) into a (0/+5V) signals using all kind of electronic beings (resistance, amplifier, ...) just to find out after that that someone had already thought about the problem and that we could buy RS232 integrated circuits everywhere. :-O
Constantly "Saving the day" should be taken as a sign of organizational dysfunction rather than individual skill - Ryan Roberts[^]
-
During starting my career as VC programmer and my first multithread program I used the while loop and global variable to wait for thread to finish.:laugh: I always recall it when ever I write WaitForSingleObject after that. :-D
DWORD dwStart = GetTickCount(); while( m_sManagerNode.IsEmpty() == FALSE ){ if( GetTickCount() - dwStart >= 60000 ){ bReturn = FALSE; break; } } return( TRUE );
Regards Anil
Yeah, I'd probably cringe if I had to look at some of the "code"(I use the term loosly) that I wrote right out of college.
-
Well, you made the lazy CPU working... :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
:)
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
During starting my career as VC programmer and my first multithread program I used the while loop and global variable to wait for thread to finish.:laugh: I always recall it when ever I write WaitForSingleObject after that. :-D
DWORD dwStart = GetTickCount(); while( m_sManagerNode.IsEmpty() == FALSE ){ if( GetTickCount() - dwStart >= 60000 ){ bReturn = FALSE; break; } } return( TRUE );
Regards Anil
-
During starting my career as VC programmer and my first multithread program I used the while loop and global variable to wait for thread to finish.:laugh: I always recall it when ever I write WaitForSingleObject after that. :-D
DWORD dwStart = GetTickCount(); while( m_sManagerNode.IsEmpty() == FALSE ){ if( GetTickCount() - dwStart >= 60000 ){ bReturn = FALSE; break; } } return( TRUE );
Regards Anil
:laugh::laugh::laugh:
Regards, Satips.:rose: Don't walk in front of me, I may not follow; Don't walk behind me, I may not lead; Walk beside me, and just be my friend. - Albert Camus