指尖上的代码--之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这两个变量是为了防止多次重复调用的。
?