test/java/util/concurrent/ConcurrentHashMap/MapLoops.java

Print this page

        

*** 32,42 **** */ /* * @test * @bug 4486658 ! * @compile MapLoops.java * @run main/timeout=1600 MapLoops * @summary Exercise multithreaded maps, by default ConcurrentHashMap. * Multithreaded hash table test. Each thread does a random walk * though elements of "key" array. On each iteration, it checks if * table includes key. If absent, with probability pinsert it --- 32,42 ---- */ /* * @test * @bug 4486658 ! * @compile -source 1.5 MapLoops.java * @run main/timeout=1600 MapLoops * @summary Exercise multithreaded maps, by default ConcurrentHashMap. * Multithreaded hash table test. Each thread does a random walk * though elements of "key" array. On each iteration, it checks if * table includes key. If absent, with probability pinsert it
*** 223,233 **** while (ops > 0) ops -= step(); barrier.await(); } catch (Throwable throwable) { ! synchronized(System.err) { System.err.println("--------------------------------"); throwable.printStackTrace(); } throwables.add(throwable); } --- 223,233 ---- while (ops > 0) ops -= step(); barrier.await(); } catch (Throwable throwable) { ! synchronized (System.err) { System.err.println("--------------------------------"); throwable.printStackTrace(); } throwables.add(throwable); }