Listing 1 shows an example of a simple pooled work queue.
清单1显示了简单的合用工作队列的示例。
The work queue mechanism is inherited from the WLM queuing manager service.
工作队列机制是从wlm队列管理器服务继承而来的。
The following class is a model of a common concurrent utility: a work queue.
下面的类是一种常见的并行实用程序模型:任务队列。
The following example illustrates a few of the core work queue API functions.
下面的例子说明了几个核心的工作队列api函数。
Thus, if the Gearman daemon fails, it can recreate the work queue on restart.
这样一来,如果Gearman守护程序故障,它就可以在重启后重新创建这个工作队列。
Before the request is processed by the servant region, it's put inside the WLM work queue.
在服务区域处理请求之前,请求被放在WLM工作队列中。
The schedule is a work queue of objects to serialize, and is held inside the formatter.
计划是要序列化的对象的工作队列,它包含在格式化程序中。
Upon successful creation of the work queue, you create two work items (allocated via kmalloc).
成功生成工作队列之后,创建两个任务项目(通过 kmalloc 来分配)。
For the former, the Gearman work queue remains in memory but is backed by a relational database.
对于前者,Gearman工作队列保存在内存并在一个关系型数据库内存有备份。
You can use a global kernel-global work queue, with four functions that address this work queue.
可以使用全局的内核全局工作队列,利用4个函数来为工作队列定位。
The work queue API provides three functions to initialize work (from an allocated buffer); see Listing 6.
工作队列API提供三个函数来初始化任务(通过一个事先分配的缓存);参见清单6。
The fork-join framework reduces contention for the work queue by using a technique known as work stealing.
fork - join框架通过一种称作工作窃取(work stealing)的技术减少了工作队列的争用情况。
Finally, Query also includes the option to constrain a search to a particular container (folder or work queue).
最后,Query还包含将搜索限制在特定容器(文件夹或工作队列)的选项。
In the panel shown in Figure 11, there are two servant regions bound to the same service class work queue, CBDEF.
在如图11所示的面板中,有两个服务区域与同一个服务分类工作队列CBDEF绑定。
WebSphere Application Server for z/OS combines a work queue mechanism with the thread pool to serve the client requests.
WebSphereApplicationServerfor z/OS 将工作队列机制与线程池组合起来为客户端请求提供服务。
As the work_struct indicates the handler function to use, you can use the work queue to queue work for a variety of handlers.
由于work_struct中指出了要采用的处理程序函数,因此可以利用工作队列来为不同的处理程序进行任务排队。
The optimum size of a thread pool depends on the number of processors available and the nature of the tasks on the work queue.
线程池的最佳大小取决于可用处理器的数目以及工作队列中的任务的性质。
Listing 10 is your init_module function, which begins with creation of the work queue using the create_workqueue API function.
清单10是init _ module函数,该函数从使用create _ workqueueapi函数生成工作队列开始。
These functions (shown in Listing 8) mimic those from Listing 7, except that you don't need to define the work queue structure.
这些函数(见清单8)模拟清单7,只是不需要定义工作队列结构体。
The column WUQue reports only the number of requests taken from the service class work queue that are bound to the server region.
WUQue列仅报告从服务分类工作队列接收并绑定到该服务区域的请求数量。
The administration work queue lets you see the list of administration actions queued up on a broker that are waiting to be actioned
管理工作队列使您可以查看在一个等待行动的代理上排队等候的管理活动的列表
You can find the implementation of the work queue API in ./kernel/workqueue.c, with API definitions in ./include/linux/workqueue.h.
在./kernel/workqueue.c 中能够找到工作队列API的实现方法, API 在 ./include/linux/workqueue.h 中定义。
Each work item is then initialized with INIT_WORK, the work defined, and then enqueued onto the work queue with a call to queue_work.
利用INIT _ work来初始化每个任务项目,任务定义完成,接着通过调用queue _work将任务安排到工作队列中。
The PooledExecutor class from this package is an efficient, widely used, correct implementation of a thread pool based on a work queue.
该包中的PooledExecut or类是一种有效的、广泛使用的以工作队列为基础的线程池的正确实现。
Basically, at any given time, any servant region will only bind to a single specific service class work queue and select requests from there.
本质上,在任何给定的时间,任何服务区域将仅绑定到单个特定的服务分类工作队列,并从该队列选择请求。
All the servant regions are now bound to existing work queues, and no servant region can immediately convert to the new service class work queue.
现在所有服务区域均绑定到现有工作队列,没有任何服务区域能够立即转换到新的服务分类工作队列。
A key problem with this model is that increasing the number of worker threads increases the contention on the work queue (this is shown in Figure 3).
对于该模型的一个关键问题是增加工作线程数会加剧对工作队列的争用(如图3所示)。
What we usually want is a work queue combined with a fixed group of worker threads, which USES wait and notify to signal waiting threads that new work has arrived.
我们通常想要的是同一组固定的工作线程相结合的工作队列,它使用wait和notify来通知等待线程新的工作已经到达了。
Here, in module cleanup, you flush the particular work queue (which blocks until the handler has completed processing of the work), and then destroy the work queue.
在模块清理过程中,会清理一些特别的工作队列(它们将保持阻塞状态直到处理程序完成对任务的处理),然后销毁工作队列。
Here, in module cleanup, you flush the particular work queue (which blocks until the handler has completed processing of the work), and then destroy the work queue.
在模块清理过程中,会清理一些特别的工作队列(它们将保持阻塞状态直到处理程序完成对任务的处理),然后销毁工作队列。
应用推荐