11-16-2005, 06:30 AM
Im running an application and pulling data from its screen. But sometimes the application freezes. It has nothing to do with the QM code, but the application im controling has a bug or a network induced timeout.
What I would like to do is to create a seporate thread, that will be set to cound down from, say 10 to 0. One step every second. The main program will be responsible to reset the counter value to 10 very frequently. So, if the value reaches 0, it will indicate that the main program is hung.
I belive this technique is called a watchDog timer.
I tryed to create a seporate macro using
mac "watchDogThread"
But it does not create a async thread. The watchDogThread only runs when the main thread exits.
I know its a simple mistake but Im not shure what Im doing wrong.
Anyone have any suggestions?
What I would like to do is to create a seporate thread, that will be set to cound down from, say 10 to 0. One step every second. The main program will be responsible to reset the counter value to 10 very frequently. So, if the value reaches 0, it will indicate that the main program is hung.
I belive this technique is called a watchDog timer.
I tryed to create a seporate macro using
mac "watchDogThread"
But it does not create a async thread. The watchDogThread only runs when the main thread exits.
I know its a simple mistake but Im not shure what Im doing wrong.
Anyone have any suggestions?