- /**
- * Begins execution of the thread.
- */
- public void start()
- {
- if( null == this.c_RealThread )
- {
- this.c_RealThread = new Thread(this);
- this.c_RealThread.start();
- }
- }
-
- /**
- * Stops execution of the thread, or at least attempts to.
- */
- public void stop()
- {
- Thread goAway = c_RealThread;
- c_RealThread = null;
- if (null != goAway) { goAway.interrupt(); }
- }
-
- /**
- * Returns true if the thread isn't null.
- */
- public boolean threadRunning()
- {
- return (null != this.c_RealThread);
- }
-
- public void run()
- {
- if (false == threadRunning())
- {
- return; // stopped before it ever started
- }
-
- }
+ /**
+ * this is the main function that derived classes must implement. it does the actual work that
+ * the thread is intended to perform. note that the derived version must not do anything to
+ * cause the thread to be ripped out while performActivity is still being invoked.
+ */
+ // hmmm: should this stay void, or use a bool status to indicate if the thread should die?
+ abstract void performActivity();