@@ -0,0 +1,482 @@
+package roxcdi.concurrent;%0A%0Aabstract class RunnableScoped implements Runnable %7B%0A%0A%09protected RunnableScoped() %7B%0A%09%0A%09%7D%0A%09%0A%09private volatile boolean finished = false ;%0A%09%0A%09public boolean isFinished() %7B%0A%09%09return finished;%0A%09%7D%0A%09%0A%09void notifyFinished() %7B%0A%09%09synchronized (this) %7B%0A%09%09%09finished = true ;%0A%09%09%09this.notifyAll();%0A%09%09%7D%0A%09%7D%0A%09%0A%09public void waitFinished() %7B%0A%09%09synchronized (this) %7B%0A%09%09%09while (!finished) %7B%0A%09%09%09%09try %7B%0A%09%09%09%09%09this.wait();%0A%09%09%09%09%7D catch (InterruptedException e) %7B%7D%0A%09%09%09%7D%09%0A%09%09%7D%0A%09%7D%0A%09%0A%7D%0A

add RunnableScoped