Fixed leaking threads in simulations
This commit is contained in:
parent
dabfa28b9d
commit
ac51ec6b5a
@ -1,3 +1,11 @@
|
|||||||
|
2012-03-13 Sampo Niskanne
|
||||||
|
|
||||||
|
* [BUG] Threads piled up when running simulations
|
||||||
|
|
||||||
|
2012-03-11 Sampo Niskanen
|
||||||
|
|
||||||
|
* Update copyright statements
|
||||||
|
|
||||||
2012-02-19 Sampo Niskanen
|
2012-02-19 Sampo Niskanen
|
||||||
|
|
||||||
* Display computed motor class
|
* Display computed motor class
|
||||||
|
@ -58,11 +58,7 @@ public class SimulationRunDialog extends JDialog {
|
|||||||
private static final double APOGEE_PROGRESS = 0.7;
|
private static final double APOGEE_PROGRESS = 0.7;
|
||||||
|
|
||||||
|
|
||||||
/*
|
private final static ExecutorService executor = Executors.newFixedThreadPool(
|
||||||
* The executor service is not static since we want concurrent simulation
|
|
||||||
* dialogs to run in parallel, ie. they both have their own executor service.
|
|
||||||
*/
|
|
||||||
private final ExecutorService executor = Executors.newFixedThreadPool(
|
|
||||||
SwingPreferences.getMaxThreadCount());
|
SwingPreferences.getMaxThreadCount());
|
||||||
|
|
||||||
|
|
||||||
@ -85,7 +81,7 @@ public class SimulationRunDialog extends JDialog {
|
|||||||
|
|
||||||
public SimulationRunDialog(Window window, Simulation... simulations) {
|
public SimulationRunDialog(Window window, Simulation... simulations) {
|
||||||
//// Running simulations...
|
//// Running simulations...
|
||||||
super(window, trans.get("SimuRunDlg.title.RunSim"), Dialog.ModalityType.DOCUMENT_MODAL);
|
super(window, trans.get("SimuRunDlg.title.RunSim"), Dialog.ModalityType.APPLICATION_MODAL);
|
||||||
|
|
||||||
if (simulations.length == 0) {
|
if (simulations.length == 0) {
|
||||||
throw new IllegalArgumentException("Called with no simulations to run");
|
throw new IllegalArgumentException("Called with no simulations to run");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user