Skip to content

Buffered reader documentation for timeout 0 #1919

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

Open
pkess opened this issue Feb 18, 2025 · 1 comment
Open

Buffered reader documentation for timeout 0 #1919

pkess opened this issue Feb 18, 2025 · 1 comment

Comments

@pkess
Copy link
Contributor

pkess commented Feb 18, 2025

Some guys asked me what would happen if one is using the BufferedReader.get_message function with a timeout of 0. I checked the implementation and it looks like as this library relys on the Python SimpleQueue this is depending on the specific system. See here:
https://bugs.python.org/issue28982

I would like to suggest some changes at least to the documentation. I have the following proposals while not all of them might be done:

  • Add information to the docstring that the timeout should always be a positive number (and maybe at least 10ms)
  • Add a check for the timeout to be at least 10ms (or even 1ms)
  • Add some information to the docstring that this relys on SimpleQueue and handling of a timeout of 0 or less is not specified

Please tell me your thoughts

@pkess
Copy link
Contributor Author

pkess commented Feb 18, 2025

Another point: maybe it might be useful if the user of the api had a function that is explicitly non blocking (either by an argument or by an explicit call.

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

No branches or pull requests

1 participant