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

[Feature Request] ShellStream.Expect - Abort if No Match Found Within a Specified Timeout Period #365

Closed
thecliguy opened this issue Dec 31, 2017 · 2 comments · Fixed by #1322
Milestone

Comments

@thecliguy
Copy link

The ShellStream Expect method currently supports a timeout as follows:

public string Expect(Regex regex, TimeSpan timeout)

I believe that when standard output is detected, examining it is a synchronous operation. Consequently, if the standard output consists of thousands of lines then you have to wait for as long as it takes and there is no way to abort:

text = _encoding.GetString(_incoming.ToArray(), 0, _incoming.Count);

I am currently using Expect against a process which can potentially emit thousands of lines to standard output. What I would like is a way to abort Expect if no match is found within a specified period of time.

I am not a C# programmer but am more than happy to conduct some testing and build the project from source if anyone can suggest any changes to make this feature request possible.

@IgorMilavec
Copy link
Collaborator

I have created a discussion #926 for all ShellStream related issues.

@WojciechNagorski
Copy link
Collaborator

This issue has been fixed in the 2024.0.0 version.

@WojciechNagorski WojciechNagorski added this to the 2024.0.0 milestone Feb 22, 2024
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 a pull request may close this issue.

3 participants