diff options
| author | ruki <[email protected]> | 2024-01-25 22:32:40 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-01-25 12:10:23 +0800 |
| commit | 039897c33bf0e4066eaae3583d09721f46226a87 (patch) | |
| tree | 9d8d6b9c79f6c68f26d86fe387a0d0638bbec96f /xmake/core/base | |
| parent | dbb46f95b4b61787857261807a741f8ae34db7f9 (diff) | |
improve to find_program
Diffstat (limited to 'xmake/core/base')
| -rw-r--r-- | xmake/core/base/scheduler.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xmake/core/base/scheduler.lua b/xmake/core/base/scheduler.lua index ab2d349d6..003c17892 100644 --- a/xmake/core/base/scheduler.lua +++ b/xmake/core/base/scheduler.lua @@ -574,9 +574,11 @@ function scheduler:co_unlock(lockname) local co_task = waiting_tasks[#waiting_tasks] if co_task then table.remove(waiting_tasks) - local ok, errors = self:co_resume(co_task) - if not ok then - return false, errors + if co_task:is_suspended() then + local ok, errors = self:co_resume(co_task) + if not ok then + return false, errors + end end end end |
