Package edu.emory.mathcs.backport.java.util.concurrent.locks

Examples of edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock


                lock.unlock();
            }
        }

        public Object[] toArray(Object[] a) {
            final ReentrantLock lock = this.lock;
            lock.lock();
            try {
                if (a.length < size)
                    return (Object[]) Arrays.copyOf(queue, size, a.getClass());
                System.arraycopy(queue, 0, a, 0, size);
                if (a.length > size)
                    a[size] = null;
                return a;
            } finally {
                lock.unlock();
            }
        }
View Full Code Here

TOP

Related Classes of edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock

Copyright © 2018 www.massapicom. 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.