Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须编写一个代码,在无限循环中从串行端口读取一些信息,但我希望这个脚本能够抵抗电源故障。我尝试迭代所有可用的端口,但它花费的时间太长,因为我需要每秒读取大约 13 行,并对它们做一些事情。处理它的最佳方法是什么?