dotnet/runtime

SerialPort read latency on linux

开放

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

 (3 条评论) (0 个反应) (0 位负责人)C# (5,445 个派生)batch import
area-System.IO.Portshelp wantedin-pr

仓库指标

星标
 (17,886 个星标)
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();

贡献者指南