Skip to content

Add --threads N flag to control parallelism #51

Closed

Description

@melihbirim

Parallel execution currently auto-picks core count (src/parallel_mmap.zig). Expose a --threads N flag to cap it — useful for benchmarking, CI, and shared machines.

Scope: parse flag, thread the value into the parallel engine's worker count. 0/absent = auto (current behavior).

Where: src/options.zig (flag), src/parallel_mmap.zig / src/mmap_engine.zig (worker count).

Done when: --threads 1 runs single-threaded and --threads 4 uses 4 workers; document in --help.

Activity

  1. Ehtasham-Yasin commented on Jul 14, 2026

    @Ehtasham-Yasin
    Contributor

    Hi! I’d like to work on this issue. I’ve reviewed the relevant CLI options and parallel execution code, and I plan to add the --threads N option while preserving the current auto-detection behavior when the value is 0 or omitted. I’ll also add tests and update the help documentation. Please let me know if there are any implementation preferences I should follow.

  2. melihbirim commented on Jul 15, 2026

    @melihbirim
    OwnerAuthor
  3. melihbirim commented on Jul 15, 2026

    @melihbirim
    OwnerAuthor

    Also dont forget to star the repo !o!

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions