Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when parallelism is disabled, don't use an intermediate buffer #8

Closed
BurntSushi opened this issue Sep 19, 2016 · 0 comments
Closed
Labels
bug A bug.

Comments

@BurntSushi
Copy link
Owner

When --threads 1 is given to ripgrep, it should not write results to an intermediate buffer. In particular, if every search is serialized (as it is when --threads 1 is given), then no synchronization is needed to print to stdout, and therefore, no intermediate buffer is needed.

This should be somewhat straight-forward, since the searcher is generic over a Printer<W: Terminal>.

In #4, I ended up doing this, but only when there was a single file (or stdin) to be searched.

@BurntSushi BurntSushi added the bug A bug. label Sep 19, 2016
amsharma91 added a commit to amsharma91/ripgrep that referenced this issue Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug.
Projects
None yet
Development

No branches or pull requests

1 participant