summaryrefslogtreecommitdiff
path: root/xmake/core/base/scheduler.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-03-18 22:44:49 +0800
committerruki <[email protected]>2020-03-18 10:28:58 +0800
commit5c3a3168f645495cc5d2ab3472d1e3d366bbb004 (patch)
tree1df244c8d97731a8c94533100a043d90f523f007 /xmake/core/base/scheduler.lua
parent0c872f6357951a3074c0b03cab8c53d66fe51839 (diff)
decrease to call string.find_last
Diffstat (limited to 'xmake/core/base/scheduler.lua')
-rw-r--r--xmake/core/base/scheduler.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/core/base/scheduler.lua b/xmake/core/base/scheduler.lua
index 4239c36a9..88c9816c0 100644
--- a/xmake/core/base/scheduler.lua
+++ b/xmake/core/base/scheduler.lua
@@ -165,7 +165,10 @@ function scheduler:_poller_events_cb(obj, events)
-- get poller object data
local pollerdata = self:_poller_data(obj)
- assert(pollerdata, string.format("%s: cannot get poller data!", obj))
+ if not pollerdata then
+ -- we cannot use assert(, ""), because this will cause the object to be serialized in advance
+ raise("%s: cannot get poller data!", obj)
+ end
-- is process object?
if obj:otype() == poller.OT_PROC then