Better thread error handling
parent
a8d82e0600
commit
63fad35d0b
14
main.lua
14
main.lua
|
@ -1,6 +1,7 @@
|
|||
local debugGraph = require 'vendor.debugGraph'
|
||||
local inspect = require 'vendor.inspect'
|
||||
local push = require 'vendor.push'
|
||||
local lurker = require 'vendor.lurker'
|
||||
|
||||
environment = os.getenv('ENV')
|
||||
|
||||
|
@ -46,6 +47,17 @@ function love.load()
|
|||
for key, node in ipairs(screens) do
|
||||
node.load()
|
||||
end
|
||||
|
||||
lurker.quiet = true
|
||||
end
|
||||
|
||||
function lurker.preswap(f)
|
||||
print(f)
|
||||
|
||||
if f:match('_thread.lua') then
|
||||
print("Preventing _thread update!")
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function getw() return push:getWidth() end
|
||||
|
@ -106,5 +118,5 @@ function love.update(dt)
|
|||
fpsGraph:update(dt)
|
||||
memGraph:update(dt)
|
||||
|
||||
require("vendor.lurker").update()
|
||||
lurker.update()
|
||||
end
|
||||
|
|
|
@ -36,7 +36,8 @@ function node.render()
|
|||
end
|
||||
|
||||
function node.update(dt)
|
||||
if lastUpdate < love.timer.getTime() - updateInterval then
|
||||
if lastUpdate < love.timer.getTime() - updateInterval or
|
||||
(not state and lastUpdate < love.timer.getTime() - 5) then
|
||||
lastUpdate = love.timer.getTime()
|
||||
print("Updating...")
|
||||
|
||||
|
|
|
@ -51,7 +51,8 @@ function node.render()
|
|||
end
|
||||
|
||||
function node.update(dt)
|
||||
if lastUpdate < love.timer.getTime() - updateInterval then
|
||||
if lastUpdate < love.timer.getTime() - updateInterval or
|
||||
(not state and lastUpdate < love.timer.getTime() - 5) then
|
||||
lastUpdate = love.timer.getTime()
|
||||
print("Updating...")
|
||||
|
||||
|
|
Loading…
Reference in New Issue