summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-03-14 00:53:08 +0800
committerruki <[email protected]>2025-04-08 15:31:54 +0800
commit00ebba39f7e81d2b52bfb3be458f9825e6d7c070 (patch)
tree007f7015fbb0720238b694c62216cace9e9d44ab
parent3a813e0ede0505a32ef9e4da7faeb792db0c40f3 (diff)
add jobgraph stub
-rw-r--r--tests/modules/async/jobgraph.lua7
-rw-r--r--tests/modules/async/runjobs.lua (renamed from tests/modules/scheduler/runjobs.lua)0
-rw-r--r--xmake/modules/async/jobgraph.lua36
3 files changed, 43 insertions, 0 deletions
diff --git a/tests/modules/async/jobgraph.lua b/tests/modules/async/jobgraph.lua
new file mode 100644
index 000000000..dd8cb05f8
--- /dev/null
+++ b/tests/modules/async/jobgraph.lua
@@ -0,0 +1,7 @@
+import("core.base.scheduler")
+import("async.jobgraph")
+
+function main()
+
+end
+
diff --git a/tests/modules/scheduler/runjobs.lua b/tests/modules/async/runjobs.lua
index 4e2a98cc0..4e2a98cc0 100644
--- a/tests/modules/scheduler/runjobs.lua
+++ b/tests/modules/async/runjobs.lua
diff --git a/xmake/modules/async/jobgraph.lua b/xmake/modules/async/jobgraph.lua
new file mode 100644
index 000000000..519544cf2
--- /dev/null
+++ b/xmake/modules/async/jobgraph.lua
@@ -0,0 +1,36 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015-present, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file jobgraph.lua
+--
+
+-- imports
+import("core.base.object")
+import("core.base.graph")
+
+-- define module
+local jobgraph = jobgraph or object {_init = {"_size"}}
+
+-- tostring
+function jobgraph:__tostring()
+ return "<jobgraph>"
+end
+
+-- new a jobgraph
+function new()
+ return jobgraph {0}
+end