读书人

手指头上的代码-之ACTIVEMQ(3)

发布时间: 2012-07-19 16:02:20 作者: rapoo

指尖上的代码--之ACTIVEMQ(3)

?

?

public void wakeup() throws InterruptedException { synchronized (runable) {if (queued || shutdown) { return; } queued = true; // The runTask() method will do this for me once we are done // iterating. if (!iterating) { executor.execute(runable); } } }?

其中queued和interating这两个变量是为了防止多次重复调用的。

?

读书人网 >开源软件

热点推荐