Better thread error handling

master
informatic 2017-01-08 19:16:30 +01:00
parent a8d82e0600
commit 63fad35d0b
3 changed files with 17 additions and 3 deletions

View File

@ -1,6 +1,7 @@
local debugGraph = require 'vendor.debugGraph' local debugGraph = require 'vendor.debugGraph'
local inspect = require 'vendor.inspect' local inspect = require 'vendor.inspect'
local push = require 'vendor.push' local push = require 'vendor.push'
local lurker = require 'vendor.lurker'
environment = os.getenv('ENV') environment = os.getenv('ENV')
@ -46,6 +47,17 @@ function love.load()
for key, node in ipairs(screens) do for key, node in ipairs(screens) do
node.load() node.load()
end 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 end
function getw() return push:getWidth() end function getw() return push:getWidth() end
@ -106,5 +118,5 @@ function love.update(dt)
fpsGraph:update(dt) fpsGraph:update(dt)
memGraph:update(dt) memGraph:update(dt)
require("vendor.lurker").update() lurker.update()
end end

View File

@ -36,7 +36,8 @@ function node.render()
end end
function node.update(dt) 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() lastUpdate = love.timer.getTime()
print("Updating...") print("Updating...")

View File

@ -51,7 +51,8 @@ function node.render()
end end
function node.update(dt) 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() lastUpdate = love.timer.getTime()
print("Updating...") print("Updating...")