Thread is blocking for readTimeout even when no data is available
elRadish opened this issue · 0 comments
elRadish commented
The thread is waiting here for 100ms! for data to arrive, even if no data is returned after a write. For some (many?) protocols, that is the case. That limits the write rate to 10/s when no data is returned.
Wouldn't it be better to check with https://learn.microsoft.com/de-de/dotnet/api/system.io.ports.serialport.bytestoread and read the data into a buffer without blocking? Once, the line delimiter is read, the message is enqueued and the buffer is emptied.