summaryrefslogtreecommitdiff
path: root/xmake/modules/async/jobgraph.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-03-27 22:49:41 +0800
committerruki <[email protected]>2025-04-08 15:31:55 +0800
commit8beb0732ff716cd5b3d7a40744b1d239302fdb4b (patch)
tree5baa79a9643e8d937efbb375e8c6005481f7d98a /xmake/modules/async/jobgraph.lua
parent881671b9516d2e5b76436db1c9456aa02625ec52 (diff)
rename add_deps to add_orders
Diffstat (limited to 'xmake/modules/async/jobgraph.lua')
-rw-r--r--xmake/modules/async/jobgraph.lua20
1 files changed, 10 insertions, 10 deletions
diff --git a/xmake/modules/async/jobgraph.lua b/xmake/modules/async/jobgraph.lua
index b72fb5b16..fe42f6647 100644
--- a/xmake/modules/async/jobgraph.lua
+++ b/xmake/modules/async/jobgraph.lua
@@ -104,25 +104,25 @@ function jobgraph:remove(name)
end
end
--- add job deps, e.g. add_deps(a, b, c, ...): a -> b -> c, ...
+-- add job orders, e.g. add_orders(a, b, c, ...): a -> b -> c, ...
--
--- and it supports nil, e.g add_deps("foo", nil, "bar", ...)
--- and it also supports to add deps list, e.g. add_deps(deps)
+-- and it supports nil, e.g add_orders("foo", nil, "bar", ...)
+-- and it also supports to add orders list, e.g. add_orders(orders)
--
-function jobgraph:add_deps(...)
+function jobgraph:add_orders(...)
local prev
local prev_is_group
local dag = self._dag
local jobs = self._jobs
local groups = self._groups
- local deps = table.pack(...)
- local count = deps.n
- if count == 1 and type(deps[1]) == "table" then
- deps = deps[1]
- count = #deps
+ local orders = table.pack(...)
+ local count = orders.n
+ if count == 1 and type(orders[1]) == "table" then
+ orders = orders[1]
+ count = #orders
end
for i = 1, count do
- local name = deps[i]
+ local name = orders[i]
if name then
local curr_is_group = false
local curr = jobs[name]