dotnet/runtime

SerialPort read latency on linux

Open

#45.635 geöffnet am 5. Dez. 2020

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C# (5.445 Forks)batch import
area-System.IO.Portshelp wantedin-pr

Repository-Metriken

Stars
 (17.886 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 12T 11h) (661 gemergte PRs in 30 T)

Beschreibung

https://github.com/dotnet/runtime/blob/dc0e11d2e681659fc20feebf4c092082e75706af/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Unix.cs#L841

if you short read the available bytes, there is a 1ms delay between reads as all reads now go via an async process and queue eg port.BytesToRead > 4

port.ReadByte(); // 1ms port.ReadByte(); // 1ms port.ReadByte(); // 1ms port.ReadByte();

Contributor Guide