This method is the destructor for the OMThread class. It is called by the doExecute method.
~OMThread deletes (destroys) the thread if it is not the current thread. If the thread to be deleted is the current thread, it cannot be destroyed (because the system will halt). In this case, the thread is marked for destruction after it is no longer the current thread.
Public
virtual ~OMThread()