Skip to content
Snippets Groups Projects
Commit cb9d6673 authored by Philipp Spohr's avatar Philipp Spohr
Browse files

Fix for not being able to unlock multithreading

parent 5fa42617
No related branches found
No related tags found
No related merge requests found
...@@ -84,10 +84,11 @@ public class AlgorithmTask extends AbstractTask { ...@@ -84,10 +84,11 @@ public class AlgorithmTask extends AbstractTask {
taskMonitor.setTitle(LocalizationManager.get("yoshTask")); taskMonitor.setTitle(LocalizationManager.get("yoshTask"));
taskMonitor.setProgress(0.0); taskMonitor.setProgress(0.0);
//Get current network //Get current network
if (net == null) { if (net == null) {
logger.warn("CoreAlgorithm called on a net that is NULL!"); logger.warn("CoreAlgorithm called on a net that is NULL!");
return; throw new Exception("CoreAlgorithm called on a net that is NULL!");
} }
//Set time limit //Set time limit
...@@ -95,6 +96,9 @@ public class AlgorithmTask extends AbstractTask { ...@@ -95,6 +96,9 @@ public class AlgorithmTask extends AbstractTask {
if (parameterSet.disableMultiThreading) { if (parameterSet.disableMultiThreading) {
LibraryInterface.setThreadLimit(1); LibraryInterface.setThreadLimit(1);
} }
else {
LibraryInterface.setThreadLimit(0);
}
//Create a node map to identify nodes and eges in the solution //Create a node map to identify nodes and eges in the solution
NodeMap nodeMap = new NodeMap(net); NodeMap nodeMap = new NodeMap(net);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment