hardbyte / hardbyte/python-can

Buffered reader documentation for timeout 0

未关闭
#1,919 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
1.6k
派生
697
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。