Reuse the ForkJoinPool in ItemList

This commit is contained in:
Balthild authored and Jason Mitchell committed 2020-05-25 13:54:38 -07:00
1 parent 458947628c
commit 4c37971a2b
3 files changed
+4 -12

No files matched your search

@@ -1,6 +1,7 @@
package codechicken.nei.recipe;
import codechicken.core.TaskProfiler;
import codechicken.nei.ItemList;
import codechicken.nei.NEIClientUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
@@ -26,7 +27,7 @@ public class GuiUsageRecipe extends GuiRecipe
TaskProfiler profiler = ProfilerRecipeHandler.getProfiler();
try {
profiler.start("recipe.concurrent.usage");
handlers = forkJoinPool.submit(() -> getUsageHandlers(inputId, ingredients)).get();
handlers = ItemList.forkJoinPool.submit(() -> getUsageHandlers(inputId, ingredients)).get();
} catch (InterruptedException | ExecutionException e) {
e.printStackTrace();
return false;