1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-25 16:36:55 +00:00
CC-Tweaked/src/main/java/dan200/computercraft/api
SquidDev 474f571798 Attach peripherals directly rather than deferring
Prior to this change we would schedule a new task which attached
peripherals on the ComputerThread on the empty task queue. This had a
couple of issues:
 - Slow running tasks on the computer thread could result in delays in
   peripherals being attached (technically, though rarely seen in
   practice).
 - Now that the ComputerThread runs tasks at once, there was a race
   condition in computers being turned on/off and peripherals being
   attached/detached.

Note, while the documentation said that peripherals would only be
(at|de)tached on the computer thread, wired modems would attach on the
server thread, so this was not the case in practice.

One should be aware that peripherals are still detached on the
computer thread, most notably when turning a computer on/off.

This is almost definitely going to break some less well-behaved mods,
and possible some of the well behaved ones. I've tested this on SC, so
it definitely works fine with Computronics and Plethora.
2019-02-25 19:11:35 +00:00
..
filesystem Remove redundant line in copyright header 2019-01-03 11:02:21 +00:00
lua Remove redundant line in copyright header 2019-01-03 11:02:21 +00:00
media Remove redundant line in copyright header 2019-01-03 11:02:21 +00:00
network Remove redundant line in copyright header 2019-01-03 11:02:21 +00:00
peripheral Attach peripherals directly rather than deferring 2019-02-25 19:11:35 +00:00
permissions Remove redundant line in copyright header 2019-01-03 11:02:21 +00:00
pocket Remove redundant line in copyright header 2019-01-03 11:02:21 +00:00
redstone Remove redundant line in copyright header 2019-01-03 11:02:21 +00:00
turtle Remove redundant line in copyright header 2019-01-03 11:02:21 +00:00
ComputerCraftAPI.java Remove redundant line in copyright header 2019-01-03 11:02:21 +00:00
package-info.java Remove redundant line in copyright header 2019-01-03 11:02:21 +00:00