Each worker thread has the J2EE context of the thread pool creator component applied to it.
每个工作线程都有适用于它的线程池创建程序组件的J2EE上下文。
A single worker thread might be able to push one logic CPU to 100% utilization in the LPAR, so the total thread number is set to number of the CPUs minus 1.
单个工作线程也许就能迫使LPAR中的一个逻辑CPU达到100%的利用率,因此将总线程数量设置为CPU数量减1。
A thread pool worker thread pulls the next WWEC from the input queue and runs it.
线程池工作线程从输入队列提取下一个WWEC,并运行它。
Work requests queued and waited for a worker thread to become available.
工作请求进入队列,等待工作线程。
Now the UI is safe and the code is simpler, because it separates the work into the part that should be done on a worker thread and the part that should be done on the UI thread.
现在UI是安全的,代码也得到简化,因为任务分解成了工作线程内完成的部分和UI线程内完成的部分。
If a worker thread must be blocked, you need to ensure that the thread is blocked for only a reasonable amount of time.
如果阻塞工作线程,则需要确保仅在合理的时间内阻塞线程。
However, when you make such a request from a Worker thread, you don't need to do this.
然而,如果是从一个Worker线程做这样的请求,就无需这么做了。
A worker thread pool, to make web applications more responsive by performing expensive operations in the background.
“工作者线程池”,通过在后台执行费时的操作使应用程序响应更加迅速。
Each worker thread performs some bit of work using the TaskHandler class.
每个工作者线程使用taskhandler类执行一部分工作。
The biggest difference is that System.Timers.Timer is a wrapper around Win32 waitable timer objects and raises an Elapsed event on a worker thread rather than a Tick event on the UI thread.
最大的区别就在与System.Timers.Timer类是对Win32可等待定时对象的一个包装,并在工作者线程上产生一个时间片消失事件而不是在UI线程上产生一个时间标记事件。
Because the TimerCallback function gets called on a worker thread, there are no skipped beats (assuming the availability of worker threads).
因为TimerCallback功能也是在工作者线程上被调用,没有一个跳动被跳过(假设有工作者线程可用)。
To handle more complex interactions with a worker thread, you might consider using a Handler in your worker thread, to process messages delivered from the UI thread.
为了用工作线程完成更加复杂的交互处理,可以考虑在工作线程中用Handler来处理UI线程分发过来的消息。
Another R5 benefit is the result of the worker thread model that we are using.
R5的另一个优点就是我们正在使用的worker线程模型带来的结果。
Throughput - 5.5 times higher for the UI thread and 870 times higher for the worker thread.
对于UI线程来说提升了5.5倍,对于worker线程来说提升了870倍。
The J2EE context of the J2EE component that creates the ThreadFactory will be preserved and reapplied to the thread prior to starting a new worker thread.
创建ThreadFactory的J2EE组件的 J2EE上下文将被保留,并在启动新的工作线程之前重新应用到线程。
The worker thread now waits for more work to appear on the input queue.
工作线程现在等待更多工作出现在输入队列上。
A snapshot is taken of the current J2EE application context on the worker thread to restore later after the work completes.
获取工作线程上当前J2EE应用程序上下文的快照,以便在工作完成之后进行恢复。
Each service invocation to the banking device blocks a worker thread within the server.
对银行设备的每次服务调用都会阻塞服务器内的工作线程。
As previously stated, a single worker thread can't process multiple transactions in parallel.
正如前面提到的,单个工作线程无法并行处理多个事务。
So a blocked worker thread, because it's waiting on a response from some remote service, can't proceed with the current transaction and can't start processing a new transaction either.
因此,由于阻塞工作线程会等待某个远程服务发送的响应,因此无法继续处理当前事务,也无法开始处理新事务。
Resume the blocked worker thread.
恢复阻塞工作线程。
No new work can be processed until a worker thread has completed its transaction and is free to begin executing the next one (Figure 3 depicts this scenario).
在工作线程完成其事务并释放以执行下一个事务前,无法处理任何新工作(图3给出了此场景的图释)。
The J2EE worker thread now waits for more work to appear on the input queue.
J2EE工作线程现在等待更多工作出现在输入队列上。
The Runnable is run on the J2EE worker thread.
可运行线程在J2EE工作线程上运行。
Dispatch the request to a new worker thread.
将请求分配给新工作线程。
Timeouts can serve as a constraint and control the amount of time the worker thread is blocked.
可以使用超时来约束和控制阻塞工作线程的时间量。
A worker thread pulls the next WWEC from the input queue and runs it.
工作线程从输入队列提取一个WWEC,并运行它。
Block the worker thread and wait for the response.
阻塞工作线程并等待响应。
When complete, the J2EE worker thread remains active.
当完成时,J2EE工作线程仍保持活动状态。
So, you must not manipulate your UI from a worker thread-you must do all manipulation to your user interface from the UI thread.
因此不允许从工作线程中操作ui——只能从UI线程中操作用户界面。
应用推荐