Skip to content

docs(task): clarify interactive task blocking behavior#8685

Merged
jdx merged 1 commit intomainfrom
docs/interactive-task-clarification
Mar 21, 2026
Merged

docs(task): clarify interactive task blocking behavior#8685
jdx merged 1 commit intomainfrom
docs/interactive-task-clarification

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Mar 21, 2026

Summary

  • Fixes misleading documentation for the interactive task property that implied non-interactive tasks could proceed in parallel while an interactive task was running
  • Clarifies that the exclusive write lock blocks all other tasks during an interactive task, and that non-interactive tasks only run in parallel with each other

Closes #8684

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only change clarifying that interactive tasks block all other tasks while running; no runtime behavior is modified.

Overview
Clarifies the interactive task property docs to state that it takes an exclusive lock that blocks all other tasks (interactive and non-interactive) while it runs.

Also reframes the comparison with raw to emphasize that raw forces global single-threaded execution via jobs = 1, while interactive is specifically about exclusive standard I/O access.

Written by Cursor Bugbot for commit 8ff81b8. This will update automatically on new commits. Configure here.

The docs previously implied non-interactive tasks could proceed in
parallel while an interactive task was running. In reality, the
interactive task holds an exclusive write lock that blocks all other
tasks until it completes. Non-interactive tasks only run in parallel
with each other.

Fixes #8684

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 21, 2026

Greptile Summary

This PR corrects the documentation for the interactive task property in docs/tasks/task-configuration.md. The previous wording ("non-interactive tasks can proceed in parallel") was misleading — the actual implementation uses a tokio::sync::RwLock where interactive tasks hold an exclusive write lock, meaning all other tasks (interactive and non-interactive alike) are blocked until the interactive task finishes. Non-interactive tasks only run in parallel with each other (shared read locks). The new text accurately reflects this behavior.

Key changes:

  • Removes the incorrect statement that non-interactive tasks can run concurrently alongside an interactive task
  • Clearly states that all other tasks are blocked while an interactive task holds the exclusive lock
  • Retains the accurate comparison to raw (which forces global single-threaded execution via jobs = 1)
  • Verified correct against the implementation in src/task/task_executor.rs (TASK_RUNTIME_LOCK: LazyLock<RwLock<()>>)

Confidence Score: 5/5

  • Safe to merge — documentation-only fix with no code changes, and the new wording is verified accurate against the implementation.
  • The change is a single-paragraph documentation correction that aligns the docs with the actual RwLock-based implementation in task_executor.rs. No logic, tests, or configuration is touched. The corrected description is factually precise.
  • No files require special attention.

Important Files Changed

Filename Overview
docs/tasks/task-configuration.md Documentation correction for interactive task property — accurately replaces the misleading claim that non-interactive tasks can proceed during an interactive task with the correct behavior: the write lock blocks all other tasks, and non-interactive tasks may only run in parallel with each other.

Sequence Diagram

sequenceDiagram
    participant T1 as Interactive Task
    participant T2 as Non-interactive Task A
    participant T3 as Non-interactive Task B
    participant L as RwLock (TASK_RUNTIME_LOCK)

    T2->>L: acquire read lock (shared)
    T3->>L: acquire read lock (shared)
    Note over T2,T3: Run in parallel ✓

    T1->>L: acquire write lock (exclusive — blocks until readers release)
    L-->>T1: lock granted
    Note over T2,T3: Blocked until T1 releases write lock

    T1->>L: release write lock
    T2->>L: acquire read lock (shared)
    T3->>L: acquire read lock (shared)
    Note over T2,T3: Resume in parallel ✓
Loading

Last reviewed commit: "docs(task): clarify ..."

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a misleading statement in the documentation regarding the interactive task property. The update clarifies that when an interactive task is running, all other tasks are blocked, ensuring exclusive access to standard I/O. This change provides a more accurate understanding of task concurrency within the system.

Highlights

  • Documentation Update: The documentation for the interactive task property was updated to clarify the blocking behavior of interactive tasks.
  • Clarification of Exclusive Lock: It is now explicitly stated that the exclusive write lock acquired by interactive tasks blocks all other tasks, including non-interactive ones.
  • Parallel Execution: The documentation emphasizes that non-interactive tasks can still run in parallel with each other.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly clarifies the blocking behavior of interactive tasks in the documentation. The previous text was misleading, and the new version accurately reflects that an interactive task blocks all other tasks. I've suggested a minor wording tweak to further improve clarity around when non-interactive tasks can run in parallel.

Comment on lines +268 to +271
Connects the task directly to the shell's stdin/stdout/stderr. Interactive tasks acquire an exclusive lock,
ensuring sole access to standard I/O — while an interactive task is running, all other tasks (both interactive
and non-interactive) are blocked. Non-interactive tasks can still run in parallel with each other. This is more
targeted than the broad `raw` setting which forces single-threaded execution globally (by setting `jobs = 1`).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For improved clarity, I suggest a slight rephrasing to explicitly state when non-interactive tasks can run in parallel. This avoids any potential ambiguity that they might run concurrently with an interactive task.

Suggested change
Connects the task directly to the shell's stdin/stdout/stderr. Interactive tasks acquire an exclusive lock,
ensuring sole access to standard I/O — while an interactive task is running, all other tasks (both interactive
and non-interactive) are blocked. Non-interactive tasks can still run in parallel with each other. This is more
targeted than the broad `raw` setting which forces single-threaded execution globally (by setting `jobs = 1`).
Connects the task directly to the shell's stdin/stdout/stderr. Interactive tasks acquire an exclusive lock,
ensuring sole access to standard I/O. While an interactive task is running, all other tasks (both interactive
and non-interactive) are blocked. When no interactive tasks are running, non-interactive tasks can run in parallel
with each other. This is more targeted than the broad `raw` setting which forces single-threaded execution globally (by setting `jobs = 1`).

@github-actions
Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.3.10 x -- echo 29.4 ± 3.5 23.8 35.5 1.00
mise x -- echo 32.3 ± 4.5 25.6 115.6 1.10 ± 0.20

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.3.10 env 25.0 ± 1.7 22.9 44.6 1.01 ± 0.08
mise env 24.7 ± 1.2 23.4 46.0 1.00

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.3.10 hook-env 27.7 ± 3.0 23.7 34.4 1.00
mise hook-env 31.8 ± 2.1 28.9 38.5 1.15 ± 0.15
⚠️ Warning: Performance variance for hook-env is 15%

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.3.10 ls 29.9 ± 1.1 27.5 40.4 1.05 ± 0.09
mise ls 28.6 ± 2.1 24.1 40.4 1.00

xtasks/test/perf

Command mise-2026.3.10 mise Variance
install (cached) 173ms 185ms -6%
ls (cached) 87ms 93ms -6%
bin-paths (cached) 93ms 94ms -1%
task-ls (cached) 947ms ✅ 846ms +11%

✅ Performance improvement: task-ls cached is 11%

@jdx jdx merged commit 5c8c3b9 into main Mar 21, 2026
38 of 39 checks passed
@jdx jdx deleted the docs/interactive-task-clarification branch March 21, 2026 20:02
mise-en-dev added a commit that referenced this pull request Mar 22, 2026
### 🚀 Features

- **(github)** read tokens from gh CLI hosts.yml config by @jdx in
[#8692](#8692)
- **(task)** support optional `args` and `env` fields in `run` entries
by @jdx in [#8687](#8687)
- **(task)** add --skip-tools flag to mise run by @jdx in
[#8699](#8699)
- **(vfox)** add try_get, try_head, try_download_file to Lua HTTP module
by @jdx in [#8697](#8697)

### 🐛 Bug Fixes

- **(config)** recognize SSH and other non-HTTPS URLs in get_repo_url by
@modestman in [#8666](#8666)
- **(docs)** add dark mode support to favicon by @jdx in
[#8678](#8678)
- **(env)** support multiple --env/-E flags by @jdx in
[#8686](#8686)
- **(github)** rename_exe renames correct binary when archive contains
multiple executables by @jdx in
[#8700](#8700)
- **(implode)** include system data dir in implode cleanup by @jdx in
[#8696](#8696)
- **(install)** skip GitHub API calls for aqua tools in --locked mode by
@jdx in [#8679](#8679)
- **(install)** skip redundant provenance verification when lockfile has
integrity data by @jdx in [#8688](#8688)
- **(lock)** respect existing platforms in lockfile when running `mise
lock` by @jdx in [#8708](#8708)
- **(lock)** skip global config lockfile by default by @jdx in
[#8707](#8707)
- **(node)** expand tilde in default_packages_file path by @jdx in
[#8709](#8709)
- **(shell)** error when no version specified instead of silent no-op by
@jdx in [#8693](#8693)
- **(shim)** detect shims by checking shims directory instead of binary
name by @jdx in [#8694](#8694)
- **(task)** inherit task_config.dir for included TOML and file tasks by
@jdx in [#8689](#8689)
- **(task)** strip inline args when validating run.tasks references by
@jdx in [#8701](#8701)
- **(task)** include idiomatic version files in monorepo task toolset by
@jdx in [#8702](#8702)
- **(task)** improve error message when task files are not executable by
@jdx in [#8705](#8705)
- **(test)** update vfox provenance test for checksum-backed skip by
@jdx in [#8703](#8703)
- improve usage spec element support in tasks by @nkakouros in
[#8623](#8623)
- make env plugin (Module) vars available in Tera template context by
@victor-founder in [#8682](#8682)
- respect MISE_COLOR=0 for color_eyre error output by @jdx in
[#8690](#8690)
- add windows support for usage tool registry by @jdx in
[#8713](#8713)

### 📚 Documentation

- **(task)** clarify interactive task blocking behavior by @jdx in
[#8685](#8685)
- improve visibility of install_before setting by @jdx in
[#8712](#8712)

### 📦 Registry

- add rtk ([github:rtk-ai/rtk](https://github.com/rtk-ai/rtk)) by
@bricelalu in [#8683](#8683)

### New Contributors

- @victor-founder made their first contribution in
[#8682](#8682)
- @modestman made their first contribution in
[#8666](#8666)
- @bricelalu made their first contribution in
[#8683](#8683)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant