Home
last modified time | relevance | path

Searched refs:ThreadLocalRandom (Results 1 – 25 of 28) sorted by relevance

12

/libcore/jsr166-tests/src/test/java/jsr166/
DThreadLocalRandomTest.java9 import java.util.concurrent.ThreadLocalRandom;
54 ThreadLocalRandom.current().setSeed(17); in testSetSeed()
63 int f = ThreadLocalRandom.current().nextInt(); in testNextInt()
65 while (i < NCALLS && ThreadLocalRandom.current().nextInt() == f) in testNextInt()
74 long f = ThreadLocalRandom.current().nextLong();
76 while (i < NCALLS && ThreadLocalRandom.current().nextLong() == f)
85 boolean f = ThreadLocalRandom.current().nextBoolean();
87 while (i < NCALLS && ThreadLocalRandom.current().nextBoolean() == f)
96 float f = ThreadLocalRandom.current().nextFloat();
98 while (i < NCALLS && ThreadLocalRandom.current().nextFloat() == f)
[all …]
DThreadLocalRandom8Test.java9 import java.util.concurrent.ThreadLocalRandom;
43 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBadStreamSize()
60 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBadStreamBounds()
77 ThreadLocalRandom r = ThreadLocalRandom.current(); in testIntsCount()
92 ThreadLocalRandom r = ThreadLocalRandom.current(); in testLongsCount()
107 ThreadLocalRandom r = ThreadLocalRandom.current(); in testDoublesCount()
122 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBoundedInts()
141 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBoundedLongs()
160 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBoundedDoubles()
179 ThreadLocalRandom r = ThreadLocalRandom.current(); in testUnsizedIntsCount()
[all …]
DRecursiveActionTest.java20 import java.util.concurrent.ThreadLocalRandom;
1240 ThreadLocalRandom rnd = ThreadLocalRandom.current(); in testSortTaskDemo()
/libcore/ojluni/src/test/java/util/concurrent/tck/
DThreadLocalRandomTest.java35 import java.util.concurrent.ThreadLocalRandom;
77 ThreadLocalRandom.current().setSeed(17); in testSetSeed()
88 ThreadLocalRandom rnd = ThreadLocalRandom.current(); in testNext()
91 m = ThreadLocalRandom.class.getDeclaredMethod( in testNext()
130 int f = ThreadLocalRandom.current().nextInt();
132 while (i < NCALLS && ThreadLocalRandom.current().nextInt() == f)
141 long f = ThreadLocalRandom.current().nextLong();
143 while (i < NCALLS && ThreadLocalRandom.current().nextLong() == f)
152 boolean f = ThreadLocalRandom.current().nextBoolean();
154 while (i < NCALLS && ThreadLocalRandom.current().nextBoolean() == f)
[all …]
DThreadLocalRandom8Test.java35 import java.util.concurrent.ThreadLocalRandom;
66 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBadStreamSize()
83 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBadStreamBounds()
100 ThreadLocalRandom r = ThreadLocalRandom.current(); in testIntsCount()
115 ThreadLocalRandom r = ThreadLocalRandom.current(); in testLongsCount()
130 ThreadLocalRandom r = ThreadLocalRandom.current(); in testDoublesCount()
145 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBoundedInts()
164 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBoundedLongs()
183 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBoundedDoubles()
202 ThreadLocalRandom r = ThreadLocalRandom.current(); in testUnsizedIntsCount()
[all …]
DCollection8Test.java59 import java.util.concurrent.ThreadLocalRandom;
302 ThreadLocalRandom rnd = ThreadLocalRandom.current();
391 ThreadLocalRandom rnd = ThreadLocalRandom.current();
430 ThreadLocalRandom rnd = ThreadLocalRandom.current();
494 ThreadLocalRandom rnd = ThreadLocalRandom.current();
568 ThreadLocalRandom rnd = ThreadLocalRandom.current();
602 ThreadLocalRandom rnd = ThreadLocalRandom.current();
737 return ts[ThreadLocalRandom.current().nextInt(ts.length)];
776 final ThreadLocalRandom rnd = ThreadLocalRandom.current();
800 final ThreadLocalRandom rnd = ThreadLocalRandom.current();
DArrayBlockingQueueTest.java51 import java.util.concurrent.ThreadLocalRandom;
65 boolean fair = ThreadLocalRandom.current().nextBoolean(); in suite()
106 ThreadLocalRandom rnd = ThreadLocalRandom.current(); in populatedQueue()
232 int size = ThreadLocalRandom.current().nextInt(1, SIZE); in testRemainingCapacity()
300 int size = ThreadLocalRandom.current().nextInt(1, SIZE); in testAddAll_insufficientSpace()
596 int size = ThreadLocalRandom.current().nextInt(1, SIZE); in testContains()
610 int size = ThreadLocalRandom.current().nextInt(1, 5); in testClear()
708 final ThreadLocalRandom rnd = ThreadLocalRandom.current(); in testToArray()
DCountedCompleter8Test.java40 import java.util.concurrent.ThreadLocalRandom;
150 int n = ThreadLocalRandom.current().nextInt(8); in testRecursiveDecomposition()
DTimeUnit8Test.java47 import java.util.concurrent.ThreadLocalRandom;
112 long n = ThreadLocalRandom.current().nextLong(); in testConvertDuration_roundtripDurationOf()
DArrayDequeTest.java45 import java.util.concurrent.ThreadLocalRandom;
75 ThreadLocalRandom rnd = ThreadLocalRandom.current(); in populatedDeque()
752 final int size = ThreadLocalRandom.current().nextInt(10); in testToArray()
DRecursiveActionTest.java46 import java.util.concurrent.ThreadLocalRandom;
1252 ThreadLocalRandom rnd = ThreadLocalRandom.current(); in testSortTaskDemo()
DJSR166TestCase.java117 import java.util.concurrent.ThreadLocalRandom;
2036 Collections.shuffle(Arrays.asList(array), ThreadLocalRandom.current());
DCountedCompleterTest.java44 import java.util.concurrent.ThreadLocalRandom;
/libcore/ojluni/src/main/java/java/util/concurrent/
DForkJoinWorkerThread.java107 ThreadLocalRandom.setInheritedAccessControlContext(this, INNOCUOUS_ACC); in ForkJoinWorkerThread()
121 ThreadLocalRandom.setInheritedAccessControlContext(this, acc); in ForkJoinWorkerThread()
122 ThreadLocalRandom.eraseThreadLocals(this); // clear before registering in ForkJoinWorkerThread()
232 ThreadLocalRandom.eraseThreadLocals(this); in afterTopLevelExec()
DThreadLocalRandom.java85 public class ThreadLocalRandom extends Random { class
151 private ThreadLocalRandom() { in ThreadLocalRandom() method in ThreadLocalRandom
176 public static ThreadLocalRandom current() { in current()
783 consumer.accept(ThreadLocalRandom.current().internalNextInt(origin, bound)); in tryAdvance()
796 ThreadLocalRandom rng = ThreadLocalRandom.current(); in forEachRemaining()
838 consumer.accept(ThreadLocalRandom.current().internalNextLong(origin, bound)); in tryAdvance()
851 ThreadLocalRandom rng = ThreadLocalRandom.current(); in forEachRemaining()
894 consumer.accept(ThreadLocalRandom.current().internalNextDouble(origin, bound)); in tryAdvance()
907 ThreadLocalRandom rng = ThreadLocalRandom.current(); in forEachRemaining()
1077 static final ThreadLocalRandom instance = new ThreadLocalRandom();
DForkJoinPool.java1591 int r = (w.id ^ ThreadLocalRandom.nextSecondarySeed()) | FIFO; // rng
1685 int seed = ThreadLocalRandom.nextSecondarySeed();
1748 int seed = ThreadLocalRandom.nextSecondarySeed();
1815 int r = ThreadLocalRandom.nextSecondarySeed();
1872 if ((r = ThreadLocalRandom.getProbe()) == 0) {
1873 ThreadLocalRandom.localInit();
1874 r = ThreadLocalRandom.getProbe();
1901 r = ThreadLocalRandom.advanceProbe(r);
1931 int r = ThreadLocalRandom.getProbe();
1942 int r = ThreadLocalRandom.getProbe();
[all …]
DLinkedTransferQueue.java707 ThreadLocalRandom randomYields = null; // bound if needed in awaitMatch()
727 randomYields = ThreadLocalRandom.current(); in awaitMatch()
DConcurrentHashMap.java2328 (c = cs[ThreadLocalRandom.getProbe() & m]) == null || in addCount()
2582 if ((h = ThreadLocalRandom.getProbe()) == 0) { in fullAddCount()
2583 ThreadLocalRandom.localInit(); // force initialization in fullAddCount()
2584 h = ThreadLocalRandom.getProbe(); in fullAddCount()
2634 h = ThreadLocalRandom.advanceProbe(h); in fullAddCount()
DConcurrentSkipListMap.java660 int lr = ThreadLocalRandom.nextSecondarySeed(); in doPut()
662 int hr = ThreadLocalRandom.nextSecondarySeed(); in doPut()
/libcore/ojluni/src/main/java/java/util/concurrent/atomic/
DStriped64.java41 import java.util.concurrent.ThreadLocalRandom;
233 ThreadLocalRandom.current(); // force initialization in longAccumulate()
317 ThreadLocalRandom.current(); // force initialization in doubleAccumulate()
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DDistinctOpTest.java40 import java.util.concurrent.ThreadLocalRandom;
75 oi = ThreadLocalRandom.current().ints().boxed().parallel().distinct().findAny(); in testWithUnorderedInfiniteStream()
/libcore/ojluni/src/main/java/java/util/concurrent/locks/
DLockSupport.java406 else if ((r = java.util.concurrent.ThreadLocalRandom.current().nextInt()) == 0) in nextSecondarySeed()
/libcore/luni/src/test/java/libcore/java/util/concurrent/
DCountedCompleterTest.java23 import java.util.concurrent.ThreadLocalRandom;
/libcore/ojluni/src/main/java/java/util/
DWeakHashMap.java30 import java.util.concurrent.ThreadLocalRandom;
/libcore/ojluni/src/main/java/java/math/
DBigInteger.java39 import java.util.concurrent.ThreadLocalRandom;
1093 rnd = ThreadLocalRandom.current(); in passesMillerRabin()

12