Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .agents/docs/2026-12-02-add-threadschedule-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ThreadSchedule 4.1.0

ThreadSchedule ships a native mcpp manifest in its source archive. The Form A
entry `katze719.threadschedule` points to that manifest and uses the release
asset produced by `mcpp publish`. The same archive serves all three platform
blocks. The entry uses a single GitHub URL because a GitCode mirror has not
been configured.

The default package exposes the headers. The `modules` feature exposes the
experimental `threadschedule` module, and the `runtime` feature links the
optional shared registry. The index workspace member exercises the C++23
module with `import std` and a move-only task on Linux with GCC 16.2.0. That
configuration is covered by upstream CI. The upstream header build covers
Windows as well.

The updater derives later archive URLs from upstream GitHub tags. The tagged
source tree contains the same manifest, module, headers and runtime sources as
the published package.

Validation used the index's pinned mcpp 2026.11.23.1. The released archive
matched the SHA-256 in the descriptor and the workspace consumer downloaded,
compiled and ran it successfully. The descriptor passed `mcpp xpkg parse`
and the index identity, platform parity, mirror and duplicate-version checks.
1 change: 1 addition & 0 deletions mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ members = [
"tests/examples/thorvg",
"tests/examples/tinyhttps",
"tests/examples/tensorvia",
"tests/examples/threadschedule-module",
"tests/examples/usockets",
"tests/examples/opencl",
"tests/examples/sycl-runtime",
Expand Down
31 changes: 31 additions & 0 deletions pkgs/k/katze719.threadschedule.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-- Form A: the release archive contains the native ThreadSchedule manifest.
package = {
spec = "1",
namespace = "katze719",
name = "threadschedule",
description = "Thread management and scheduling for C++",
licenses = {"MIT"},
repo = "https://github.com/Katze719/ThreadSchedule",
type = "package",

extensions = {
autoupdate = {
tag = "v${version}",
url = "https://github.com/Katze719/ThreadSchedule/archive/refs/tags/${tag}.tar.gz",
},
},

xpm = {
linux = {
['4.1.0'] = { url = "https://github.com/Katze719/ThreadSchedule/releases/download/v4.1.0/threadschedule-4.1.0.tar.gz", sha256 = "f35790f50ea1543a61ffdf96821f6814e31955902114b99bcc145c014422654b" },
},
macosx = {
['4.1.0'] = { url = "https://github.com/Katze719/ThreadSchedule/releases/download/v4.1.0/threadschedule-4.1.0.tar.gz", sha256 = "f35790f50ea1543a61ffdf96821f6814e31955902114b99bcc145c014422654b" },
},
windows = {
['4.1.0'] = { url = "https://github.com/Katze719/ThreadSchedule/releases/download/v4.1.0/threadschedule-4.1.0.tar.gz", sha256 = "f35790f50ea1543a61ffdf96821f6814e31955902114b99bcc145c014422654b" },
},
},

mcpp = "*/mcpp.toml",
}
13 changes: 13 additions & 0 deletions tests/examples/threadschedule-module/mcpp.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "threadschedule-module-tests"
version = "0.1.0"
standard = "c++23"

[toolchain]
linux = "gcc@16.2.0"

[indices]
katze719 = { path = "../../.." }

[target.linux.dependencies]
katze719.threadschedule = { version = "=4.1.0", features = ["modules"] }
15 changes: 15 additions & 0 deletions tests/examples/threadschedule-module/tests/smoke.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#if defined(__linux__)
import std;
import threadschedule;
#endif

int main()
{
#if defined(__linux__)
threadschedule::thread_pool pool(threadschedule::worker_count{1});
auto task = pool.submit([value = std::make_unique<int>(42)] { return *value; });
return task && task->get() == 42 ? 0 : 1;
#else
return 0;
#endif
}