A better approach is to start a timer, and have timer poke the event thread every so often to go look at the staging area for updates.
更好的方法是启动计时器,并且使计时器不时地提醒事件线程去查看中间区域,以寻找更新。
The second thread can interact with the Event thread by using a staging area and a timer.
第二个线程可以通过一个中间区域(staging area)和一个计时器,与EventThread进行交互。
When messages from WebSphere MQ arrive, the second thread places the updates into a staging area.
当WebSphereMQ的消息到达时,第二个线程就将更新放在中间区域中。
When messages from WebSphere MQ arrive, the second thread places the updates into a staging area.
当WebSphereMQ的消息到达时,第二个线程就将更新放在中间区域中。
应用推荐