Remove calculation threads causing concurrency issues (#3002)

This commit is contained in:
Anton Bulakh
2021-06-09 18:54:49 +03:00
committed by GitHub
parent c45991ed83
commit 7a888aaf3e
2 changed files with 53 additions and 61 deletions

View File

@@ -99,7 +99,6 @@ public class FluidGridHandler implements IFluidGridHandler {
FluidStack stack = network.getFluidStorageCache().getCraftablesList().get(id); FluidStack stack = network.getFluidStorageCache().getCraftablesList().get(id);
if (stack != null) { if (stack != null) {
Thread calculationThread = new Thread(() -> {
ICalculationResult result = network.getCraftingManager().create(stack, quantity); ICalculationResult result = network.getCraftingManager().create(stack, quantity);
if (result == null) { if (result == null) {
return; return;
@@ -130,9 +129,6 @@ public class FluidGridHandler implements IFluidGridHandler {
) )
); );
} }
}, "RS crafting preview calculation");
calculationThread.start();
} }
} }

View File

@@ -190,7 +190,6 @@ public class ItemGridHandler implements IItemGridHandler {
ItemStack stack = network.getItemStorageCache().getCraftablesList().get(id); ItemStack stack = network.getItemStorageCache().getCraftablesList().get(id);
if (stack != null) { if (stack != null) {
Thread calculationThread = new Thread(() -> {
ICalculationResult result = network.getCraftingManager().create(stack, quantity); ICalculationResult result = network.getCraftingManager().create(stack, quantity);
if (!result.isOk() && result.getType() != CalculationResultType.MISSING) { if (!result.isOk() && result.getType() != CalculationResultType.MISSING) {
@@ -218,9 +217,6 @@ public class ItemGridHandler implements IItemGridHandler {
) )
); );
} }
}, "RS crafting preview calculation");
calculationThread.start();
} }
} }