public void stop() { running = false; try { thread.join(); } catch (InterruptedException ex) { } System.out.println("Philosopher # " + getID() + " stopped."); thread = null; }
public void go() { System.out.println("Time to go..."); running = true; thread = new Thread(this); thread.start(); }