C#和核心2到期CPU [英] C# & Core 2 due CPUs
本文介绍了C#和核心2到期CPU的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨.
如何为Core 2 CPU编写程序?
我的意思是,该程序将内核之间的进程划分了!
感谢
Hi.
How can we write a program for a Core 2 due CPU ?
I mean, a program that divides the process between cores !
Thanks
推荐答案
通过使用线程.在Thread,ThreadPool,BackgroundWorker类上阅读MSDN.
也许可以看看 http://www.albahari.com/threading / [ ^ ]和http://www.ddj.com/hpc-high-performance-computing/216500409 [
Hi,
by using Threads. Read up MSDN on Thread, ThreadPool, BackgroundWorker classes.
And maybe have a look at http://www.albahari.com/threading/[^] and http://www.ddj.com/hpc-high-performance-computing/216500409[^].
:)
您可以使用多线程,但是要意识到OS本身和.NET的内部操作已经在这样做.还应注意,为实现多线程而使用多线程可能会毫无理由地增加复杂性,并导致程序实际运行速度变慢.
You can use multi-threading, but realize that the OS itself and the internal operations of .NET are already doing that. Also be aware that multi-threading for the sake of multi-threading may add complexity for no reason and cause your program to actually run slower.
这篇关于C#和核心2到期CPU的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文