@Override public void call() { if (compareAndSet(false, true)) { try { dispose.call(resource); } finally { resource = null; dispose = null; } } }
public void notify(E args) { List<Action1<E>> actions = getActions(); for (Action1<E> action : actions) { action.execute(args); } }