summaryrefslogtreecommitdiff
path: root/xmake/core/base/thread.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/base/thread.lua')
-rw-r--r--xmake/core/base/thread.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/xmake/core/base/thread.lua b/xmake/core/base/thread.lua
index e4759372a..1e0551f75 100644
--- a/xmake/core/base/thread.lua
+++ b/xmake/core/base/thread.lua
@@ -222,11 +222,9 @@ end
-- lock file
--
--- @param opt the argument option, {shared = true}
---
-- @return ok, errors
--
-function _mutex:lock(opt)
+function _mutex:lock()
-- ensure opened
local ok, errors = self:_ensure_opened()
@@ -235,7 +233,7 @@ function _mutex:lock(opt)
end
-- lock it
- if self._LOCKED_NUM > 0 or thread.mutex_lock(self:cdata(), opt) then
+ if self._LOCKED_NUM > 0 or thread.mutex_lock(self:cdata()) then
self._LOCKED_NUM = self._LOCKED_NUM + 1
return true
else