recv_internal: timeout=None means block forever#5
Conversation
|
@BenGardiner Thank you very much. In fact, this interface references the implementation of gs_usb. As you pointed out in hardbyte/python-can#2026, the code in gs_usb treats None as non-blocking. If this is incorrect, then when hardbyte/python-can#2026 is merged, this patch will also be merged. Besides, our implementation only supports timeouts up to 2^32-1 milliseconds (approximately 49 days). If None represents forever, perhaps we need to provide an elegant function at the C API level to achieve this? |
965f4dc to
2940fb6
Compare
|
I've update the magic constant to 2**32-1 I think 49d is close enough to forever for this. But yes the 100% correct fix would be to block indefitnitely I think. Please see hardbyte/python-can#2031 where I have proposed the in-tree gs_usb fix. watch there to see if that is merged Although: I never use the gs_usb driver anymore : now I use python-can-candle almost exclusively ♥ |
based on discussion here hardbyte/python-can#2026 I think this is a valid change.
I've tested it here on a 500kbps medium-load bus....