summaryrefslogtreecommitdiff
path: root/xmake/core/base/scheduler.lua
diff options
context:
space:
mode:
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