You shouldn't need the parallel API here - in fact I can't actually see why you wouldn't get updates on both monitors, though the order of your rednet pulls is a bit odd…
I'd also say that having the turtles sending in new data constantly is excessive (I'd have them use a sleep(1) instead of a sleep(0)
at the very least, and make that sleep statement execute
regardless as to whether the turtles are in debug mode), but that's up to you.
Anyway, I'd recommend taking these lines from the top of your server script:
local incomingID,message = rednet.receive()
local reData = textutils.unserialize(message)
… and turn them into just local declarations for now:
local incomingID,message,reData
Now at the top of the checkData() function:
function checkData()
incomingID,message = rednet.receive()
reData = textutils.unserialize(message)
if incomingID == 2 then
.
.
.
And remove the rednet pulls from your checkReactorHeat/checkBreederHeat functions:
-------------------Reactor
function checkReactorHeat()
return reData.Heat
end
--print("Reactor check done")
-------------------Breeder
function checkBreederHeat()
return reData.Heat
end
--print("Breeder check done")
(I
assume you're using those functions with the graph API correctly; I've not meddled with it myself).
Now you're checking to see which system the data came from
before you work with it, as opposed to checking which system the
last set of data came from before pulling in a new set from who-knows-what source.
Edit: It's probably worth mentioning that rednet messages come in as events. Most functions that pull items from the event queue grab whatever event's're next in line there and
discards them until it finds what it wants, which will obviously cause other event-reliant functions to malfunction if you try to use them together. For example, sleep() relies on the event queue for a timer event, and rednet.receive() wants a rednet_message event - so a computer that uses sleep will "miss" any rednet messages sent to it until it sleeping, after which it'll act like those messages were never received.
As far as I can tell your server script doesn't have this problem, but I thought it worth mentioning. The parallel API is a good way around this issue if it DOES come up, as each function you run in parallel gets it own copy of the event queue - meaning one function can pull what it likes from its copy without affecting what the other can see.