public final void run() {
   if (firstRun) {
     plugin_prerun(); // plugin first time through
     firstRun = false;
   }
   while (state == RUNNING) {
     boolean xwakep = waker.waitForSignal();
     setAwakened(xwakep);
     plugin_cycle(); // do work
     if (isYielding) Thread.yield();
   }
 }
 private void signalStateChange() {
   if (waker != null) {
     waker.signalNotify(waker.INTERNAL);
   }
 }
 public void signalNotify(int event) {
   super.signalNotify(event);
   tm.trigger();
 }