diff options
| -rw-r--r-- | xmake/core/base/scheduler.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/core/base/scheduler.lua b/xmake/core/base/scheduler.lua index 262c842dd..12808a162 100644 --- a/xmake/core/base/scheduler.lua +++ b/xmake/core/base/scheduler.lua @@ -547,6 +547,9 @@ function scheduler:co_lock(lockname) if co_locked_tasks[lockname] == nil then co_locked_tasks[lockname] = running return true + -- has been locked by the current coroutine + elseif co_locked_tasks[lockname] == running then + return true end -- register timeout task to timer |
