dotnet/runtime

SerialPort read latency on linux

Open

#45,635 创建于 2020年12月5日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)C# (5,445 fork)batch import
area-System.IO.Portshelp wantedin-pr

仓库指标

Star
 (17,886 star)
PR 合并指标
 (平均合并 12天 11小时) (30 天内合并 661 个 PR)

描述

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();

贡献者指南