A wrapper class to create and spawn a thread
A wrapper class to create and spawn a thread. It is a base class. ThreadIf::thread() is a pure virtual method .Usage: To use this class, derive from it and override the thread() method. To start the thread, call the run() method. The code in thread() will run in a separate thread.
Call shutdown() from the constructing thread to shut down the code. This will set the bool shutdown_ to true. The code in thread() should react properly to shutdown_ being set, by returning. Call join() to join the code.
Sample:
... DerivedThreadIf thread; thread.run(); ... do stuff ... thread.shutdown(); thread.join();
virtual ~ThreadIf()
virtual void run()
virtual void join()
virtual void exit()
void shutdown()
bool isShutdown()
virtual void thread()
VThread itsThread
ThreadIf(const ThreadIf &)
const ThreadIf& operator=(const ThreadIf &)
generated by doc++