现在的位置: 首页 > 综合 > 正文

使用线程的三种方式

2013年06月22日 ⁄ 综合 ⁄ 共 635字 ⁄ 字号 评论关闭

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.

抱歉!评论已关闭.