多线程 [英] Multi threading , C#
问题描述
我在这里有一个查询,这差不多是我一周前遇到的问题.这就是通过回调方法将连续数据从硬件获取到C#的全部方法.每个数据包的传输速率为1/2毫秒.
在C#winforms 3.5中,我创建了一个带有IsBacground属性为true的线程(异步).运行良好.
我立即想到,我从工具箱中获取了BagroundWorker线程,并以CallAsync性质运行.这也很好.
在这里,我的观察是,与system.Threading相比,Bagound工作者线程的运行速度如此之快.可能是什么原因?请解释其背后的概念.
Hi,
I have a query here which is almost a week back I faced. This is all to get the continuous data from a hardware to C# in call back methods. Transfer rate is 1/2 millisecond for each packet.
In C# winforms 3.5, I have created a Thread (Asynchronous) with IsBacground property as true. It was running fine.
As my immediate thought, I took BagroundWorker thread from tool box and running as CallAsync nature. This is also running fine.
Here my observation is , Bagound worker thread is running so fast when compared to system.Threading. What might be the reason ? Please explain the concept behind it.
推荐答案
唯一的原因可能是滥用技术.如果不能运行得更快.您做错了什么.我没有您的代码的信息以提供任何详细信息. :-)
—SA
The only reason could be abuse of technology. If cannot run faster. There is something you did wrong. I have no information on your code to give any detail. :-)
—SA
尝试此 [ ^ ] wiki链接.它具有有用的信息
-NDK
Try this [^]wiki link. It has useful informaion
-NDK
这篇关于多线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!