The request/response cycle lends itself to the classic one thread per connection model.
请求/响应周期使它成为了经典的模型,即每个连接使用一个线程。
Thus it is relatively straightforward to implement the classic one thread per connection model.
因此实现典型的每个连接一个线程的模型便非常简单。
A global thread (per server process) is responsible for creating and managing each user connection thread.
一个全局线程(每个服务器进程一个)负责创建和管理用户连接线程。
Bear in mind that all applications might not be as well behaved as DayTrader from a connection management perspective, and therefore might use more than one connection per thread.
记住,从连接管理的角度来看,所有应用程序都不能具有DayTrader那么优异的表现,因此可以为一个线程使用多个连接。
By using a ThreadLocal in our Singleton, as shown in Listing 3, we can allow any class in our program to easily acquire a reference to a per-thread Connection.
如清单3所示,通过使用“单子”中的ThreadLocal,我们就能让我们的程序中的任何类容易地获取每线程Connection的一个引用。
In order to improve load scalability, some applications employ a different type of MT architecture: they create one or more thread (s) per task rather than one thread per connection.
为了提高负载能力,产生了一些不同类型的MT架构:创建多组线程,每组线程服务一个任务,而不是一个线程服务一个连接。
In order to improve load scalability, some applications employ a different type of MT architecture: they create one or more thread (s) per task rather than one thread per connection.
为了提高负载能力,产生了一些不同类型的MT架构:创建多组线程,每组线程服务一个任务,而不是一个线程服务一个连接。
应用推荐