有关轮询线程,需要记住以下内容。
两个线程(中断线程和轮询线程)
策略3:使用轮询线程。
然而,轮询线程是在一个普通进程上下文中运行的。
However, the polling thread will run in a normal process context.
给予轮询线程最大优先级,从而最小化丢失度量结果的风险。
Give the polling threads maximum priority to minimise the risk of missing a measurement.
轮询线程会一直等待第一个线程给它发送一个信号。
The polling thread waits for the signal from the first thread.
如果未配置轮询线程,则IDS将启动一个轮询线程。
If poll threads are not configured, IDS will start one poll thread.
如果池变空,那么我们就会遗漏罐子,因为轮询线程没有空间再去存储传入的度量结果。
If the pool became empty, then we would miss jars because the polling threads would have nowhere to store incoming measurements.
第二条显示了轮询线程最终设法获得一个measurement对象时遗漏了多少个罐子。
The second shows how many jars were missed when the polling thread finally managed to get a measurement object.
需要另外一个单独的轮询线程,在调度 tasklet时,第一个线程会通知它。
You will need another separate polling thread, which will get notified by the first thread when to schedule a tasklet.
第一条消息来自轮询线程,当轮询线程尝试和未能成功从池中获取measurement 时发出。
The first message comes from the polling thread when it tries and fails to get a measurement object from the pool.
为此,我们将轮询线程的线程优先级设置为38(最高的RT 优先级),将筛选池线程的优先级设置为 37。
To do this, we set the thread priority of the polling threads to 38 (the highest RT priority) and the priorities of the triage pool threads to 37.
ProductionLine轮询线程需要向筛选池发送数据,筛选池中的每个线程都需要向审计线程传递数据。
The ProductionLine polling thread needs to send data to the triage pool, and each thread in the triage pool needs to pass data to the auditing thread.
例如,每个生产线轮询线程都将在不朽内存中启动,查询ProductionLine之前,要为其预先创建一个作用域。
For our example, each production line polling thread will be started in immortal memory and have a scope created up front that's entered each time before querying the ProductionLine.
我们将使用一个NHRT来最小化轮询被垃圾收集器中断的线程以及丢失度量结果的可能性。
We'll use an NHRT to minimise the possibility of the polling thread being interrupted by the garbage collector and missing measurements.
在轮询响应时,此异常仅适用于调用程序的线程。
This exception is only applicable in the caller's thread while polling for a response.
如果考虑WeighingMachine接口,weighJar()方法需要频繁轮询,因此明智的做法是为每个ProductionLine 使用一个专用线程,使设计可伸缩。
If we consider the WeighingMachine interface, the weighJar() method needs to be frequently polled, so it's sensible to have a dedicated thread for each ProductionLine to make the design scalable.
然而,在长轮询中,一个客户机可能需要随时向服务器发送一个重要请求,因此,服务器再一次需要为每个客户机准备一个或多个线程。
In long polling, however, a client would have an outstanding request to the server at any point of time.
其他线程可能进入休眠状态,只被定期唤醒以轮询更改或更新状态信息。
Other threads might enter a sleeping state only to be awakened periodically to poll for a change or update status information.
设计中我们提出了在EJB容器内实现异步多线程轮询的解决方案。
This paper brings up a solution of multi-thread asynchronous polling in EJB container.
设计中我们提出了在EJB容器内实现异步多线程轮询的解决方案。
This paper brings up a solution of multi-thread asynchronous polling in EJB container.
应用推荐