資源簡介
創建一個線程,并將該線程綁定到多核cpu中,不占用主線程的資源,這樣可以在所開的線程中做一些動作,不會影響主線程中的動作。應用:客戶將所有的刷新動作交給主線程完成時,可能拖動鼠標,窗口均在不斷的刷新,CPU資源占用率很高,導致整個程序運行速度變慢,這樣時候,可以考慮將一些刷新顯示的工作綁定到另一顆核中去實現。

代碼片段和文件信息
//?stdafx.cpp?:?source?file?that?includes?just?the?standard?includes
// TestThread.pch?will?be?the?pre-compiled?header
// stdafx.obj?will?contain?the?pre-compiled?type?information
#include?“stdafx.h“
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????3651??2009-08-21?00:03??TestThread\ReadMe.txt
?????文件???????1078??2009-08-21?00:03??TestThread\res\TestThread.ico
?????文件????????402??2009-08-21?00:03??TestThread\res\TestThread.rc2
?????文件????????550??2009-08-21?00:20??TestThread\resource.h
?????文件????????212??2009-08-21?00:03??TestThread\StdAfx.cpp
?????文件???????1054??2009-08-21?00:03??TestThread\StdAfx.h
?????文件??????34660??2009-09-02?07:16??TestThread\TestThread.aps
?????文件????????726??2009-09-02?07:25??TestThread\TestThread.clw
?????文件???????2119??2009-08-21?00:03??TestThread\TestThread.cpp
?????文件???????4231??2009-08-21?00:03??TestThread\TestThread.dsp
?????文件????????545??2009-08-21?00:03??TestThread\TestThread.dsw
?????文件???????1368??2009-08-21?00:03??TestThread\TestThread.h
?????文件??????50176??2009-09-02?07:25??TestThread\TestThread.ncb
?????文件??????48640??2009-09-02?07:25??TestThread\TestThread.opt
?????文件????????978??2009-09-02?07:23??TestThread\TestThread.plg
?????文件???????4443??2009-09-02?07:16??TestThread\TestThread.rc
?????文件???????3328??2009-09-02?07:25??TestThread\TestThreadDlg.cpp
?????文件???????1363??2009-08-21?00:04??TestThread\TestThreadDlg.h
?????文件?????126924??2009-09-02?07:25??TestThread\圖1未將線程綁定到第二顆cpu上時的測試狀態.jpg
?????文件?????125694??2009-09-02?07:22??TestThread\圖2將線程綁定到第二顆cpu上時的測試狀態.jpg
?????目錄??????????0??2009-08-21?00:03??TestThread\res
?????目錄??????????0??2009-09-02?07:26??TestThread
-----------?---------??----------?-----??----
???????????????412142????????????????????22
- 上一篇:抽取插值CIC濾波器 完整原理介紹
- 下一篇:MELCOR使用簡介
評論
共有 條評論