mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-10 09:20:28 +00:00
662fb96beb
This restructures monitor in order to make it thread-safe: namely removing any world interaction from the computer thread. Instead of each monitor having their own terminal, resize flag, etc... we use a monitor "multiblock" object. This is constructed on the origin monitor and propagated to other monitors when required. We attempt to construct the multiblock object (and so the corresponding terminal) as lazily as posible. Consequently, we only create the terminal when fetching the peripheral (not when attaching, as that is done on the computer thread). If a monitor is resized (say due to placing/breaking a monitor) then we will invalidate all references to the multiblock object, construct a new one if required, and propagate it to all component monitors. This commit also fixes several instances of glLists not being deleted after use. It is not a comprehensive fix, but that is outside the scope of this commit. |
||
---|---|---|
.. | ||
java/dan200/computercraft | ||
resources |