Skip to content

[Feature Idea] Parallel Execution #34

Closed

Description

@albertalef

Problem: Independent commands run sequentially; can't leverage multiple cores.

Solution: Add parallel execution block.

sh do
  # Run commands in parallel, wait for all to complete
  results = parallel do
    grep("error", "log1.txt")
    grep("error", "log2.txt")
    grep("error", "log3.txt")
  end

  results.each { |r| puts r.stdout }
end

# With concurrency limit
sh do
  parallel(max: 4) do
    files.each { |f| gzip(f) }
  end
end

# Fail-fast mode (stop all on first error)
sh do
  parallel(fail_fast: true) do
    test_suite_1
    test_suite_2
    test_suite_3
  end
end

Implementation:

  • Create RubyShell::Parallel executor using threads or Process.fork
  • Collect results from all parallel commands
  • Add options for concurrency limit, fail-fast behavior

Activity

  1. linked a pull request that will close this issueFeature: Parralel Execution #48on Feb 4, 2026
  2. Repository owner locked and limited conversation to collaborators on Feb 5, 2026
  3. converted this issue into a discussion #53 on Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions