src.samples.java.ex.SWCO_Sample Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sb-contrib Show documentation
Show all versions of sb-contrib Show documentation
An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.
The newest version!
package ex;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
public class SWCO_Sample {
CountDownLatch cdl;
CyclicBarrier cb;
public SWCO_Sample() {
cdl = new CountDownLatch(2);
cb = new CyclicBarrier(2);
}
public void waitCDL() throws InterruptedException {
cdl.wait();
}
public void waitCB() throws InterruptedException {
cb.wait();
}
}