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

fd waits for the whole traversal if the only matches arrive within max_buffer_time #868

Closed
tavianator opened this issue Oct 28, 2021 · 2 comments · Fixed by #895
Closed
Assignees
Labels

Comments

@tavianator
Copy link
Collaborator

If all the matches are received very quickly, within max_buffer_time, then they'll be added to the buffer without being printed. The first match to arrive after the time limit will kick it into streaming mode, but if we never get any more matches then that never happens and we'll wait for the whole search to complete before printing anything.

I guess the fix is to use rx.recv_timeout() instead of for worker_result in rx here.

@tavianator tavianator added the bug label Oct 28, 2021
@tavianator tavianator self-assigned this Oct 28, 2021
@sharkdp
Copy link
Owner

sharkdp commented Nov 10, 2021

Thank you for reporting this!

tavianator added a commit to tavianator/fd that referenced this issue Nov 26, 2021
The new ReceiverBuffer struct allows us to factor out the receiver
implementation into a number of helper methods.  The new implementation
uses rx.{recv,recv_timeout} instead of a for loop, which enables us to
switch to streaming mode at the right time without waiting for more
results.

Fixes sharkdp#868.
tavianator added a commit to tavianator/fd that referenced this issue Nov 26, 2021
The new ReceiverBuffer struct allows us to factor out the receiver
implementation into a number of helper methods.  The new implementation
uses rx.{recv,recv_timeout} instead of a for loop, which enables us to
switch to streaming mode at the right time without waiting for more
results.

Fixes sharkdp#868.
tavianator added a commit to tavianator/fd that referenced this issue Nov 27, 2021
The new ReceiverBuffer struct allows us to factor out the receiver
implementation into a number of helper methods.  The new implementation
uses rx.{recv,recv_timeout} instead of a for loop, which enables us to
switch to streaming mode at the right time without waiting for more
results.

Fixes sharkdp#868.
@sharkdp
Copy link
Owner

sharkdp commented Jan 6, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants