三種方法
1.Tread Pools
2.OpenMP
3.Grand Central Dispatch
其他: Microsoft Threading Building Block (TBB)
Thread Pools (Create a number of threads in a pool where they await work)
優點
1.比較快去service a request (用現有的thread比去創造一個新的快)
2.允許在application(s)的n個threads被約束size
3.分開的task
4.工作可以被規畫或設定優先權
The number of threads in the pool (heuristically)
1.The number of CPUs in the system
2.The amount of physical
3.The expected number of concurrent client request
OpenMP
Set of "compiler direction" and an "API"
為parallel programming 提供一個 shared memory 環境
Identifies parallel regions
文章標籤
全站熱搜

Tread -> thread!!
謝謝提醒 已修正