Skip to content

Commit

Permalink
Reactivate threaded caching of resource preview icons
Browse files Browse the repository at this point in the history
Potential deadlock fixed by b835749
  • Loading branch information
Argent77 committed Jul 21, 2023
1 parent b835749 commit 9aae06c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/org/infinity/NearInfinity.java
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ public void windowClosing(WindowEvent event) {
e.printStackTrace();
}

cacheResourceIcons(false);
cacheResourceIcons(true);

statusBar = new StatusBar();
ResourceTreeModel treemodel = ResourceFactory.getResourceTreeModel();
Expand Down Expand Up @@ -922,7 +922,7 @@ public void refreshGame() {
containerpanel.revalidate();
containerpanel.repaint();
}
cacheResourceIcons(false);
cacheResourceIcons(true);
} finally {
blocker.setBlocked(false);
}
Expand Down Expand Up @@ -1527,7 +1527,6 @@ private void cacheResourceIcons(boolean threaded) {
// ensure that ongoing operations have ended before starting a new operation
cancelCacheResourceIcons();

// TODO: resolve deadlock when accessing resource tree while cache operation is performed
if (threaded) {
iconCacheWorker = new SwingWorker<Void, Void>() {
@Override
Expand Down

0 comments on commit 9aae06c

Please sign in to comment.