List of usage examples for java.lang Runnable notify
@HotSpotIntrinsicCandidate public final native void notify();
From source file:com.ab.bitmap.AbImageCache.java
/** * ??./* w w w. j av a2 s .c om*/ * * @param key urlkey */ public static void removeWaitRunnableFromCache(String key) { try { lock.lock(); for (int i = 0; i < waitRunnableList.size(); i++) { HashMap<String, Runnable> runnableMap = waitRunnableList.get(i); Runnable runnable = runnableMap.get(key); if (runnable != null) { //if(D) Log.d(TAG, ":"+runnable); synchronized (runnable) { runnable.notify(); } waitRunnableList.remove(runnableMap); i--; } } } catch (Exception e) { e.printStackTrace(); } finally { lock.unlock(); } }
From source file:com.inter.trade.view.slideplayview.AbImageCache.java
/** * ??./*from ww w .ja v a2s.c o m*/ * * @param key urlkey */ public static void removeWaitRunnableFromCache(String key) { try { lock.lock(); for (int i = 0; i < waitRunnableList.size(); i++) { HashMap<String, Runnable> runnableMap = waitRunnableList.get(i); Runnable runnable = runnableMap.get(key); if (runnable != null) { if (D) Log.d(TAG, ":" + runnable); synchronized (runnable) { runnable.notify(); } waitRunnableList.remove(runnableMap); i--; } } } catch (Exception e) { e.printStackTrace(); } finally { lock.unlock(); } }