Package java.lang.ref

Examples of java.lang.ref.ReferenceQueue.poll()


        objectUnderTest_.add(o1);

        o1 = null;

        while (queue.poll() == null && System.currentTimeMillis() < timeout)
        {
            System.gc();
        }

        assertTrue(objectUnderTest_.isEmpty());
View Full Code Here


            ReferenceQueue q = queueMap.get(l.getClass());

            if (q != null) {
                DocReference r;
                synchronized (q) {
                    while ((r = (DocReference) q.poll()) != null) {
                        staleListeners.add(r.getListener());
                    }
                }
            }
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.