惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
S
Schneier on Security
P
Privacy & Cybersecurity Law Blog
S
Security @ Cisco Blogs
W
WeLiveSecurity
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
NISL@THU
NISL@THU
T
Troy Hunt's Blog
L
LangChain Blog
L
LINUX DO - 最新话题
T
The Exploit Database - CXSecurity.com
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
A
About on SuperTechFans
N
Netflix TechBlog - Medium
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
Martin Fowler
Martin Fowler
Y
Y Combinator Blog
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
T
Threat Research - Cisco Blogs
SecWiki News
SecWiki News
Microsoft Security Blog
Microsoft Security Blog
T
Tenable Blog
P
Proofpoint News Feed
H
Hacker News: Front Page
G
GRAHAM CLULEY
I
Intezer
V
V2EX
S
Secure Thoughts
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
Latest news
Latest news
Recent Announcements
Recent Announcements
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
博客园_首页
Webroot Blog
Webroot Blog
博客园 - 三生石上(FineUI控件)
AI
AI
N
News | PayPal Newsroom
Google DeepMind News
Google DeepMind News
Security Archives - TechRepublic
Security Archives - TechRepublic
B
Blog RSS Feed
美团技术团队

博客园 - Jans

Flutter运行时闪退 利用 Python 爬虫来对文本进行批量化翻译 Thinkpad T460声音问题 Error 56: The Cisco Systems, Inc. VPN Service has not been started(Cisco VPN在Vista/Win 7下出现Error 56的解决办法) - Jans Weblogic中配置Active Directory Authentication Provider weblogic 10.3.5重置密码 在基于WCF开发的Web Service导出WSDL定义问题及自定义wsdl:port 名称 JNI:在线程或信号处理函数中访问自定义类 (转)Java实现Web Service过程中处理SOAP Header的问题 Geek to Live: Set up your personal Wikipedia (转)GitHub上整理的一些工具,求补充 - (转)老衣的开发工具和类库集之2014版 GCC的内存边界对齐 如何删除Weblogic域 电蚊拍选购参考 Localizing WPF with .resx files ASP.NET MVC的国际化问题 小众的分布式版本管理工具Code Co-op 关于效率长尾现象
C#操作串口总结
Jans · 2013-08-21 · via 博客园 - Jans

       最近几天一直在调一个要长时间连续不断的操作串口,并且是多线程运行,不允许中断的服务。后来服务经常运行一段时间就是死锁了,没有任何响应,我把精力都放在多线程的死锁问题上,还以为C#的lock关键字在遇到异常时是否会失效,难以保证最后锁的释放等等,却少于去查看,是否我的应用里哪个地方有没有问题,好在开了VS的IntelliTrace还是给出了很给力的信息,一下定位到了死锁时的语句,我豁然开朗,原来SerialPort的ReadTo可能会读不到期望的值,那就有可能一直阻塞在那里,但是我的应用里好像没有ReadTimeout的设置,赶紧查MSDN,果然,ReadTimeout默认值居然是无穷。

        OK,找到问题的原因,解决起来就很Easy了,果然服务再也没有再死过。