125126127128129130131132133134135
t1=new LongRunningThread(1, 20000); t.assignTask(t1); Util.sleep(1000); t.stop(); t.waitUntilDone(); assertTrue(t.done()); assertFalse(t.isAlive()); }
222223224225226227228229230231232
if (threads == null) { ThreadListCommand cmd = new ThreadListCommand(this); this.postCommand(cmd); try { cmd.waitUntilDone(1000); threads = cmd.getThreads(); } catch (InterruptedException e) { threads = new PyThread[0]; } }