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 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

View File

@ -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...")

View File

@ -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...")