python-can icon indicating copy to clipboard operation
python-can copied to clipboard

AsyncBufferedReader misses messages

Open pthomas opened this issue 3 years ago • 2 comments

Hello,

I'm using can.AsyncBufferedReader(), and it seems if there is too much time time between reader.get_message() calls then messages are lost. They are still seen by wireshark, but not from reader.get_message(). Is this the expected behavior? Is there anything that can be done about this?

Even very small sleeps like time.sleep(0.001) will cause this issue.

OS and version: Ubuntu Kernel: 5.4.0-107-generic Python version: 3.8.10 python-can version: 4.0.0 python-can interface/s (if applicable): socketcan w/ peak_usb

Any help would be appreciated.

-Paul

pthomas avatar Apr 14 '22 18:04 pthomas

@pthomas did you solve this issue?

MohamedAboushnief avatar Jun 22 '23 11:06 MohamedAboushnief

Please provide a code example. Using the blocking time.sleep(0.001) with asyncio looks wrong to me.

zariiii9003 avatar Jun 22 '23 11:06 zariiii9003