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

Read with timeout instead of blocking #367

Closed
wants to merge 1 commit into from
Closed

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Jul 12, 2023

Previously we were using a blocking read to wait for completions, which would deadlock if a worker thread had panicked.

Now we will read in a loop, and return an error if we timeout.

I've arbitrarily decided that ten seconds is a reasoanble timeout interval, but it might not be! We also may wish to make this setting configurable.

With this, we will no longer hang (#365) although I do think we should look into better handling of panics (and I'm going to poke at that a bit more, now)

Previously we were using a blocking read to wait for completions, which
would deadlock if a worker thread had panicked.

Now we will read in a loop, and return an error if we timeout.

I've arbitrarily decided that ten seconds is a reasoanble timeout
interval, but it might not be! We also may wish to make this setting
configurable.
@rsheeter
Copy link
Contributor

rsheeter commented Jul 12, 2023 via email

@cmyr
Copy link
Member Author

cmyr commented Jul 12, 2023

I tend to agree, if you see a timeout that doesn't involve IO it probably means someone made an architectural mistake.

Going to look into the more principled options, and depending on how easy that is we can decide if this is a useful stopgap.

@cmyr
Copy link
Member Author

cmyr commented Jul 13, 2023

superseded by #371

@cmyr cmyr closed this Jul 13, 2023
@cmyr cmyr deleted the non-blocking-reads branch July 13, 2023 19:38
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 this pull request may close these issues.

2 participants