Package xbird.util.concurrent.counter

Examples of xbird.util.concurrent.counter.UnsafeIntCounter.compareAndSet()


        do {
            capa = pinning.get();
            if(capa == -1) {// does not pin when the entry is evicted
                return false;
            }
        } while(!pinning.compareAndSet(capa, capa + 1));
        return true;
    }

    public final void unpin() {
        _pinning.decrementAndGet();
View Full Code Here


        do {
            capa = pinning.get();
            if(capa == -1) {// does not pin when the entry is evicted
                return false;
            }
        } while(!pinning.compareAndSet(capa, capa + 1));
        return true;
    }

    public final void unpin() {
        _pinning.decrementAndGet();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.