Package org.jdk8.backport

Examples of org.jdk8.backport.LongAdder.sum()


                X.println("__ active: " + exec.active());

                Thread.sleep(200);
            }

            assertEquals(threads * loops, sum.sum());

            X.println("_ ok");
        }

        assertTrue(exec.shutdown(0));
View Full Code Here


            Thread.sleep(200);

            assertTrue(exec.shutdown(50));

            long res = sum.sum();

            assertTrue(res > 0);

            finish.set(true);
View Full Code Here

            finish.set(true);

            fut.get();

            assertEquals(res, sum.sum()); // Nothing was executed after shutdown.

            X.println("_ ok");
        }
    }
}
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.