thread not detaching in Programming Posted November 13, 2023 Im trying to control a nuclearcraft reactor with the rc api and threading, but when i run it freezes the whole pc function start() local thread = require("thread") t = thread.create(function() local component = require("component") local r = component.nc_fusion_reactor while(true) do if(r.getEfficiency() < 100) then r.activate() else r.deactivate() end end end):detach() end function stop() t:kill() end
thread not detaching
in Programming
Posted
Im trying to control a nuclearcraft reactor with the rc api and threading, but when i run it freezes the whole pc