hardbyte / hardbyte/python-can

Buffered reader documentation for timeout 0

Đang mở
#1,919 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
1.6k
Fork
697
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.