diff options
| author | ruki <[email protected]> | 2026-08-25 22:37:57 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-08-25 22:37:57 +0800 |
| commit | 99fe359338e06c0edafedb273790b41144e015dc (patch) | |
| tree | e47c183deab552b6273f356cfbb044a0ba41641c | |
| parent | ca19857df423c136956b6ab17c4662033415e77f (diff) | |
fix co_resume
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/base/scheduler.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/core/sandbox/modules/import/core/base/scheduler.lua b/xmake/core/sandbox/modules/import/core/base/scheduler.lua index 222bee391..a3f9741c3 100644 --- a/xmake/core/sandbox/modules/import/core/base/scheduler.lua +++ b/xmake/core/sandbox/modules/import/core/base/scheduler.lua @@ -96,7 +96,11 @@ end -- resume the given coroutine function sandbox_core_base_scheduler.co_resume(co, ...) - return scheduler:resume(co:thread(), ...) + local ok, errors = scheduler:co_resume(co, ...) + if not ok then + raise(errors) + end + return ok, errors end -- suspend the current coroutine |
