#776 FFDec stop working at all after setting "number of threads" to 0 fixed

This commit is contained in:
honfika@gmail.com
2015-01-21 12:59:07 +01:00
parent 4afa3c4ac1
commit dfd3166bb9
5 changed files with 14 additions and 5 deletions

View File

@@ -87,7 +87,7 @@ public class FolderPreviewPanel extends JPanel {
static {
noImage.fillTransparent();
executor = Executors.newFixedThreadPool(Configuration.parallelSpeedUp.get() ? Configuration.parallelThreadCount.get() : 1);
executor = Executors.newFixedThreadPool(Configuration.parallelSpeedUp.get() ? Configuration.getParallelThreadCount() : 1);
}
public FolderPreviewPanel(final MainPanel mainPanel, List<TreeItem> items) {
@@ -156,7 +156,7 @@ public class FolderPreviewPanel extends JPanel {
public synchronized void setItems(List<TreeItem> items) {
this.items = items;
executor.shutdownNow();
executor = Executors.newFixedThreadPool(Configuration.parallelSpeedUp.get() ? Configuration.parallelThreadCount.get() : 1);
executor = Executors.newFixedThreadPool(Configuration.parallelSpeedUp.get() ? Configuration.getParallelThreadCount() : 1);
cachedPreviews.clear();
revalidate();
repaint();