Code Example: Scheduler continued
synchronized public void done() {
if (runningThread != Thread.currentThread()) {
String msg = "Wrong Thread";
throw new IllegalStateException(msg);
} // if
Previous slide
Next slide
Back to first slide
View graphic version