Skip to content

Commit 9788068

Browse files
authored
Add ThreadSchedule 4.1.0 (#973)
1 parent 35fac1d commit 9788068

5 files changed

Lines changed: 83 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ThreadSchedule 4.1.0
2+
3+
ThreadSchedule ships a native mcpp manifest in its source archive. The Form A
4+
entry `katze719.threadschedule` points to that manifest and uses the release
5+
asset produced by `mcpp publish`. The same archive serves all three platform
6+
blocks. The entry uses a single GitHub URL because a GitCode mirror has not
7+
been configured.
8+
9+
The default package exposes the headers. The `modules` feature exposes the
10+
experimental `threadschedule` module, and the `runtime` feature links the
11+
optional shared registry. The index workspace member exercises the C++23
12+
module with `import std` and a move-only task on Linux with GCC 16.2.0. That
13+
configuration is covered by upstream CI. The upstream header build covers
14+
Windows as well.
15+
16+
The updater derives later archive URLs from upstream GitHub tags. The tagged
17+
source tree contains the same manifest, module, headers and runtime sources as
18+
the published package.
19+
20+
Validation used the index's pinned mcpp 2026.11.23.1. The released archive
21+
matched the SHA-256 in the descriptor and the workspace consumer downloaded,
22+
compiled and ran it successfully. The descriptor passed `mcpp xpkg parse`
23+
and the index identity, platform parity, mirror and duplicate-version checks.

‎mcpp.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ members = [
279279
"tests/examples/thorvg",
280280
"tests/examples/tinyhttps",
281281
"tests/examples/tensorvia",
282+
"tests/examples/threadschedule-module",
282283
"tests/examples/usockets",
283284
"tests/examples/opencl",
284285
"tests/examples/sycl-runtime",

‎pkgs/k/katze719.threadschedule.lua‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
-- Form A: the release archive contains the native ThreadSchedule manifest.
2+
package = {
3+
spec = "1",
4+
namespace = "katze719",
5+
name = "threadschedule",
6+
description = "Thread management and scheduling for C++",
7+
licenses = {"MIT"},
8+
repo = "https://github.com/Katze719/ThreadSchedule",
9+
type = "package",
10+
11+
extensions = {
12+
autoupdate = {
13+
tag = "v${version}",
14+
url = "https://github.com/Katze719/ThreadSchedule/archive/refs/tags/${tag}.tar.gz",
15+
},
16+
},
17+
18+
xpm = {
19+
linux = {
20+
['4.1.0'] = { url = "https://github.com/Katze719/ThreadSchedule/releases/download/v4.1.0/threadschedule-4.1.0.tar.gz", sha256 = "f35790f50ea1543a61ffdf96821f6814e31955902114b99bcc145c014422654b" },
21+
},
22+
macosx = {
23+
['4.1.0'] = { url = "https://github.com/Katze719/ThreadSchedule/releases/download/v4.1.0/threadschedule-4.1.0.tar.gz", sha256 = "f35790f50ea1543a61ffdf96821f6814e31955902114b99bcc145c014422654b" },
24+
},
25+
windows = {
26+
['4.1.0'] = { url = "https://github.com/Katze719/ThreadSchedule/releases/download/v4.1.0/threadschedule-4.1.0.tar.gz", sha256 = "f35790f50ea1543a61ffdf96821f6814e31955902114b99bcc145c014422654b" },
27+
},
28+
},
29+
30+
mcpp = "*/mcpp.toml",
31+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "threadschedule-module-tests"
3+
version = "0.1.0"
4+
standard = "c++23"
5+
6+
[toolchain]
7+
linux = "gcc@16.2.0"
8+
9+
[indices]
10+
katze719 = { path = "../../.." }
11+
12+
[target.linux.dependencies]
13+
katze719.threadschedule = { version = "=4.1.0", features = ["modules"] }
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#if defined(__linux__)
2+
import std;
3+
import threadschedule;
4+
#endif
5+
6+
int main()
7+
{
8+
#if defined(__linux__)
9+
threadschedule::thread_pool pool(threadschedule::worker_count{1});
10+
auto task = pool.submit([value = std::make_unique<int>(42)] { return *value; });
11+
return task && task->get() == 42 ? 0 : 1;
12+
#else
13+
return 0;
14+
#endif
15+
}

0 commit comments

Comments
 (0)