it.ssc.step.parallel.Task Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsr331-ssc Show documentation
Show all versions of jsr331-ssc Show documentation
This is a JSR331 interface for SSC (Software for the Calculation of the Simplex) is a java library for solving linear programming problems v. 3.0.1.
SSC was designed and developed by Stefano Scarioli.
The newest version!
package it.ssc.step.parallel;
import java.util.concurrent.CyclicBarrier;
import java.util.logging.Level;
import java.util.logging.Logger;
import it.ssc.log.SscLogger;
public class Task implements Runnable {
private static final Logger logger=SscLogger.getLogger();
private CyclicBarrier barrier;
private Parallelizable step;
public Task(CyclicBarrier barrier, Parallelizable step) {
this.barrier = barrier;
this.step = step;
}
public void run() {
try {
step.run();
barrier.await();
}
catch (Exception e) {
logger.log(Level.SEVERE,"Execution run() method of ParallelProcesses",e);
throw new RuntimeException(e);
}
}
}