|| (t2 != null && t2.isAlive())
|| (t3 != null && t3.isAlive())
|| (t0 != null && t0.isAlive());
+ // could just as easily ask discoverer if it is still running instead of
+ // holding ref to thread
}
}
}
{
}
}
+ aborted = false;
Cache.log.debug("Old discovery thread has finished.");
}
running = true;
return true;
}
+ public boolean restart()
+ {
+ synchronized (this)
+ {
+ if (running)
+ {
+ aborted = true;
+ }
+ else
+ {
+ running = true;
+ }
+ return aborted;
+ }
+ }
+
/**
* Start a fresh discovery thread and notify the given object when we're
* finished. Any known existing threads will be killed before this one is
*/
public Thread startDiscoverer(PropertyChangeListener changeSupport2)
{
+ /* if (restart())
+ {
+ return;
+ }
+ else
+ {
+ Thread thr = new Thread(this);
+ thr.start();
+ }
+ */
if (isRunning())
{
setAborted(true);
Cache.initLogger();
disc = JalviewJabawsTestUtils.getJabawsDiscoverer(false);
+ while (disc.isRunning())
+ {
+ // don't get services until discoverer has finished
+ Thread.sleep(100);
+ }
+
for (Jws2Instance svc : disc.getServices())
{