summaryrefslogtreecommitdiff
path: root/xmake/core/base/timer.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-02-06 22:43:57 +0800
committerruki <[email protected]>2020-02-07 22:45:57 +0800
commit36ee7b8a95969aa4bfbf1d354da13dc3ba6da81d (patch)
treefb3cda1c23829fd1054af3c17f2fbd8e5acb0d85 /xmake/core/base/timer.lua
parent7bda7f45e60afb5515d325fd098e1d4aab4c939b (diff)
fix scheduler timer/raise
Diffstat (limited to 'xmake/core/base/timer.lua')
-rw-r--r--xmake/core/base/timer.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/core/base/timer.lua b/xmake/core/base/timer.lua
index 96a876bcb..78e1026cd 100644
--- a/xmake/core/base/timer.lua
+++ b/xmake/core/base/timer.lua
@@ -86,7 +86,10 @@ function timer:next()
end
-- run timer task
if task.func then
- task.func(task.cancel)
+ local ok, errors = task.func(task.cancel)
+ if not ok then
+ return false, errors
+ end
triggered = true
end
end
@@ -95,6 +98,7 @@ function timer:next()
break
end
end
+ return true
end
-- kill all timer tasks