使用線程的三種方式

來源:互聯網
上載者:User

1.流水線:

每個線程反覆的在資料序列集上執行同一操作,並把操作結果傳遞給下一步驟的其它線程。

Pipelie:

Each thread repeatedly performs the same operation on a sequence of date sets, passing each result to another thread for the next step. This is also known as an "assembly line."

2.工作群組:

每個線程在自己的資料上執行操作,工作群組中的線程可能執行同樣的操作,也可能執行不同的操作,但是他們一定是獨立的執行。

Work crew:

Each thread performs an operation on its own data. Threads in a work crew may all perform the same operation, or each a separate operation, but they always proceed independently.

3.用戶端/伺服器:

一個客戶為每一件工作與每一個獨立的伺服器”訂契約”。通常“訂契約”是匿名的-一個請求通過某個連接埠提交。

Clent/server:

A client "contract" with an independent server for each job. Often the "contract" is anonymous---a request is made through some interface that queues the work item.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.