[PR #1937] [MERGED] fix(threads): lower helper thread priority on Android #3878

Closed
opened 2026-11-03 04:12:57 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1937
Author: @rdbtCVS
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/android-helper-scheduling


📝 Commits (1)

  • 95c336a fix(threads): lower helper thread priority on Android

📊 Changes

2 files changed (+10 additions, -10 deletions)

View changed files

📝 crates/horizon-threads/Cargo.toml (+1 -1)
📝 crates/horizon-threads/src/lib.rs (+9 -9)

📄 Description

🤖 Opened by rdbtCVS's AI agent (Codex), not by rdbtCVS himself.

What and why

Fixes #1751.

Include Android in horizon-threads' libc dependency, helper scheduling implementation, and corresponding test cfgs. Android helpers now use the existing nice +10 / SCHED_IDLE behavior after put_helpers_behind(), rather than returning false through the fallback. Update the helper scheduling comments to name both supported platforms. favour_current() is unchanged.

Vanilla reference

Horizon-only OS scheduling hint; no gameplay or vanilla algorithm changes. Reuses the existing Linux implementation without changing its calls or priority values.

Validation

  • cargo test -p horizon-threads: 2 tests passed.
  • nice -n 10 cargo test -p horizon-threads: 2 tests passed, including the SCHED_IDLE fallback.
  • cargo check -p horizon-threads --tests --target aarch64-linux-android: passed (library and test code).
  • cargo clippy -p horizon-threads --all-targets --locked -- -D warnings: passed.
  • Android runtime/device testing was not performed; the cross-target check does not link or run an Android executable.

Self-check

pr_ready (tools/pr_ready.py on archlinux, against origin/main at d0f61d07c, 17 min 31 s)

Check Result
Scope ✅ 2 files, +10 −10
Cargo.lock ✅ unchanged
Public tree ✅ (2 s)
Python tests ➖ no Python change
rustfmt ✅ (14 s)
clippy ✅ (1 min 54 s)
tests: horizon-threads ✅ 2 passed (2 s)
doc tests ✅ 0 passed (3 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ❌ 111 affected, (14 min 58 s)
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The full self-check exited 1 because its broad parity run was stopped after approximately 15 minutes (641 seconds building probes). Five harnesses completed and passed: audio_attributes, block_entity_anim, block_entity_render, block_entity_tickers, and block_particles. Several oracle shim processes produced no output for several minutes; the remaining selected harnesses were not completed. Parity is incomplete, not a pass. All other applicable self-check steps passed, including Clippy for horizon-client and horizon-threads.

Maintainer edits are enabled.

🤖 Generated with Codex


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/1937 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/android-helper-scheduling` --- ### 📝 Commits (1) - [`95c336a`](https://github.com/horizon-rust/horizon/commit/95c336a3870b003b6da5b7baae01d87e8cddee4b) fix(threads): lower helper thread priority on Android ### 📊 Changes **2 files changed** (+10 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-threads/Cargo.toml` (+1 -1) 📝 `crates/horizon-threads/src/lib.rs` (+9 -9) </details> ### 📄 Description > 🤖 Opened by rdbtCVS's AI agent (Codex), not by rdbtCVS himself. ## What and why Fixes #1751. Include Android in horizon-threads' libc dependency, helper scheduling implementation, and corresponding test cfgs. Android helpers now use the existing nice +10 / SCHED_IDLE behavior after put_helpers_behind(), rather than returning false through the fallback. Update the helper scheduling comments to name both supported platforms. favour_current() is unchanged. ## Vanilla reference Horizon-only OS scheduling hint; no gameplay or vanilla algorithm changes. Reuses the existing Linux implementation without changing its calls or priority values. ## Validation - cargo test -p horizon-threads: 2 tests passed. - nice -n 10 cargo test -p horizon-threads: 2 tests passed, including the SCHED_IDLE fallback. - cargo check -p horizon-threads --tests --target aarch64-linux-android: passed (library and test code). - cargo clippy -p horizon-threads --all-targets --locked -- -D warnings: passed. - Android runtime/device testing was not performed; the cross-target check does not link or run an Android executable. ## Self-check **pr_ready** (`tools/pr_ready.py` on archlinux, against origin/main at d0f61d07c, 17 min 31 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +10 −10 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (2 s) | | Python tests | ➖ no Python change | | rustfmt | ✅ (14 s) | | clippy | ✅ (1 min 54 s) | | tests: horizon-threads | ✅ 2 passed (2 s) | | doc tests | ✅ 0 passed (3 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ❌ 111 affected, (14 min 58 s) | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The full self-check exited 1 because its broad parity run was stopped after approximately 15 minutes (641 seconds building probes). Five harnesses completed and passed: audio_attributes, block_entity_anim, block_entity_render, block_entity_tickers, and block_particles. Several oracle shim processes produced no output for several minutes; the remaining selected harnesses were not completed. Parity is **incomplete**, not a pass. All other applicable self-check steps passed, including Clippy for horizon-client and horizon-threads. Maintainer edits are enabled. 🤖 Generated with [Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:12:57 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3878
No description provided.