Improve cross-thread world interaction
rubensworks opened this issue · 2 comments
Issue type:
- ➕ Feature request
Short description:
The IngredientObserver
will do some cross-thread world reading. Even though we built in many security checks around this, it still seems to lead to some problems (CyclopsMC/IntegratedTunnels#242, #1072).
So, once and for all, we should rethink how the IngredientObserver
calculates its diffs efficiently. The world reading MUST fully take place on the main world thread.
For anyone running into this problem, disabling ingredientNetworkObserverEnableMultithreading
in the ID config should fix the problem for now.
Note to self: ingrobserver: pull ingreds in world thread, but handle diff in offthread (make sure only offthread has to wait for stuff)