INTRODUCTION Overview Download and Install Documentation Publications REPOSITORY Libraries DEVELOPER Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
gbxiceutilacfr::SafeThread Class ReferenceA version of the Thread class which catches all possible exceptions. More...
Inherits gbxiceutilacfr::Thread. Inherited by gbxserialdeviceacfr::SerialDeviceHandler, gbxsmartbatteryacfr::OceanServer, TestThread, and TestThreadWithThrow.
Detailed DescriptionA version of the Thread class which catches all possible exceptions.If an exception is caught when the thread is not stopping, an error trace message will be printed. Then the thread wil wait for someone to call stop(). To use this class, simply implement the pure virtual walk() function. void MyThread::walk() { // initialize // main loop while ( !isStopping() ) { // do something } // clean up }
Member Function Documentation
This implementation calls walk(), catches all possible exceptions, prints out errors and waits for someone to call stop(). References gbxutilacfr::Tracer::debug(), gbxutilacfr::Tracer::error(), gbxiceutilacfr::Thread::isStopping(), and gbxiceutilacfr::Thread::waitForStop().
The documentation for this class was generated from the following files:
|