summaryrefslogtreecommitdiff
path: root/xmake/modules/lib/detect/features.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/lib/detect/features.lua')
-rw-r--r--xmake/modules/lib/detect/features.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/modules/lib/detect/features.lua b/xmake/modules/lib/detect/features.lua
index e07c89923..60799c667 100644
--- a/xmake/modules/lib/detect/features.lua
+++ b/xmake/modules/lib/detect/features.lua
@@ -20,6 +20,7 @@
-- imports
import("lib.detect.find_tool")
+import("core.base.scheduler")
-- get all features of the current tool
--
@@ -57,11 +58,11 @@ function main(name, opt)
local results = _g._RESULTS
-- @note avoid detect the same program in the same time if running in the coroutine (e.g. ccache)
- local coroutine_running = coroutine.running()
+ local coroutine_running = scheduler.co_running()
if coroutine_running then
while _g._checking ~= nil and _g._checking == key do
local curdir = os.curdir()
- coroutine.yield()
+ scheduler.co_yield()
os.cd(curdir)
end
end