stec-platform
VremThread Class Reference

The VremThread class Vremthead is a normal thread, but is constructed so that the loader or vrem program or opc or whatever, has a hook to close the thread down. This should be used for threading by vrem plugins, this allows the vrem platform to close and clean up threads correctly. The user does not need to worry about clean up. More...

#include <vremthread.h>

Inheritance diagram for VremThread:
Collaboration diagram for VremThread:

Public Member Functions

 VremThread (QObject *parent=0)
 Constructor.
 
virtual void WakeMeUp (void)
 user should use to trigger event if it gets hit, user should exit run
 
bool cleanExit (int MaxdelayToTerminate_ms=10000)
 shutdown this thread cleanly, if it can it returns true, if fails return false if it needed to teminate More...
 
bool ContinueToRun (void)
 run should poll this event to determine clean shutdown
 

Detailed Description

The VremThread class Vremthead is a normal thread, but is constructed so that the loader or vrem program or opc or whatever, has a hook to close the thread down. This should be used for threading by vrem plugins, this allows the vrem platform to close and clean up threads correctly. The user does not need to worry about clean up.

Member Function Documentation

◆ cleanExit()

bool VremThread::cleanExit ( int  MaxdelayToTerminate_ms = 10000)

shutdown this thread cleanly, if it can it returns true, if fails return false if it needed to teminate

shutdown this thread cleanly, if it can it returns true, if fails return false if it needed to teminate

first we try to clean this function so if logging it completes or is something else it cleans up correctly

OK tell inherited class to he should leave by setting his run flag off..

now wake this guy up if he is sleeping in his run() by what ever method he uses

tell called we needed to go dirty on the clean up, logging may not have closed correctly///


The documentation for this class was generated from the following files: