Home
last modified time | relevance | path

Searched refs:pool (Results 1 – 25 of 39) sorted by relevance

12

/libcore/ojluni/src/main/java/java/util/concurrent/
DForkJoinWorkerThread.java73 final ForkJoinPool pool; // the pool this thread works in field in ForkJoinWorkerThread
82 protected ForkJoinWorkerThread(ForkJoinPool pool) { in ForkJoinWorkerThread() argument
85 this.pool = pool; in ForkJoinWorkerThread()
86 this.workQueue = pool.registerWorker(this); in ForkJoinWorkerThread()
92 ForkJoinWorkerThread(ForkJoinPool pool, ThreadGroup threadGroup, in ForkJoinWorkerThread() argument
97 this.pool = pool; in ForkJoinWorkerThread()
98 this.workQueue = pool.registerWorker(this); in ForkJoinWorkerThread()
107 return pool; in getPool()
157 pool.runWorker(workQueue); in run()
167 pool.deregisterWorker(this, exception); in run()
[all …]
DForkJoinTask.java386 wt.pool.awaitJoin(w, this, 0L) : in doJoin()
399 (wt = (ForkJoinWorkerThread)t).pool. in doInvoke()
1027 s = wt.pool.awaitJoin(wt.workQueue, this, deadline); in get()
1091 wt.pool.helpQuiescePool(wt.workQueue); in helpQuiesce()
1132 ((ForkJoinWorkerThread) t).pool : null; in getPool()
1289 (wt = (ForkJoinWorkerThread)t).pool.nextTaskFor(wt.workQueue) : in pollTask()
1308 ((ForkJoinWorkerThread)t).pool.pollSubmission() : null; in pollSubmission()
DForkJoinPool.java711 public ForkJoinWorkerThread newThread(ForkJoinPool pool); in newThread() argument
720 public final ForkJoinWorkerThread newThread(ForkJoinPool pool) { in newThread() argument
721 return new ForkJoinWorkerThread(pool); in newThread()
820 final ForkJoinPool pool; // the containing pool (may be null) field in ForkJoinPool.WorkQueue
829 WorkQueue(ForkJoinPool pool, ForkJoinWorkerThread owner) { in WorkQueue() argument
830 this.pool = pool; in WorkQueue()
876 ForkJoinPool p = pool; in push()
1164 transferStealCount(pool); in runTask()
2388 Thread t; ForkJoinWorkerThread wt; ForkJoinPool pool; WorkQueue q; in getSurplusQueuedTaskCount() local
2390 int p = (pool = (wt = (ForkJoinWorkerThread)t).pool).config & SMASK; in getSurplusQueuedTaskCount()
[all …]
/libcore/luni/src/test/java/libcore/java/util/concurrent/
DForkJoinPoolTest.java37 final ForkJoinPool pool = new ForkJoinPool(); in testSubmit() local
38 try (ExecutorServiceAutoCloseable cleaner = new ExecutorServiceAutoCloseable(pool)) { in testSubmit()
40 ForkJoinTask task = pool.submit(() -> result.addAndGet(42), result); in testSubmit()
50 final ForkJoinPool pool = new ForkJoinPool(); in testGetRunningThreadCount() local
51 try (ExecutorServiceAutoCloseable cleaner = new ExecutorServiceAutoCloseable(pool)) { in testGetRunningThreadCount()
52 assertEquals(0, pool.getRunningThreadCount()); in testGetRunningThreadCount()
56 ForkJoinTask task = pool.submit(new Runnable() { in testGetRunningThreadCount()
64 assertEquals(1, pool.getRunningThreadCount()); in testGetRunningThreadCount()
67 pool.awaitTermination(2000, TimeUnit.MILLISECONDS); in testGetRunningThreadCount()
68 assertEquals(0, pool.getRunningThreadCount()); in testGetRunningThreadCount()
DForkJoinTaskTest.java43 final ForkJoinPool pool = new ForkJoinPool(1); in testAdaptToRunnableWithResult() local
44 try (ExecutorServiceAutoCloseable cleaner = new ExecutorServiceAutoCloseable(pool)) { in testAdaptToRunnableWithResult()
45 pool.execute(task); in testAdaptToRunnableWithResult()
62 final ForkJoinPool pool = new ForkJoinPool(1); in testAdaptToCallable() local
63 try (ExecutorServiceAutoCloseable cleaner = new ExecutorServiceAutoCloseable(pool)) { in testAdaptToCallable()
64 pool.execute(task); in testAdaptToCallable()
81 final ForkJoinPool pool = new ForkJoinPool(1); in testAdaptToCallableThrowsException() local
82 try (ExecutorServiceAutoCloseable cleaner = new ExecutorServiceAutoCloseable(pool)) { in testAdaptToCallableThrowsException()
83 pool.execute(task); in testAdaptToCallableThrowsException()
DCountedCompleterTest.java137 final ForkJoinPool pool; in completeAllChildren() field in CountedCompleterTest.MainTask
141 MainTask(ForkJoinPool pool, int lo, int hi) { in completeAllChildren() argument
143 this.pool = pool; in completeAllChildren()
157 pool.submit(new Task(this, idx)); in completeAllChildren()
174 ForkJoinPool pool = new ForkJoinPool(1); in completeAllChildren() local
175 MainTask task = new MainTask(pool, 0, array.length); in completeAllChildren()
176 pool.submit(task); in completeAllChildren()
/libcore/ojluni/src/main/java/sun/nio/ch/
DAsynchronousChannelGroupImpl.java55 private final ThreadPool pool; field in AsynchronousChannelGroupImpl
73 ThreadPool pool) in AsynchronousChannelGroupImpl() argument
76 this.pool = pool; in AsynchronousChannelGroupImpl()
78 if (pool.isFixedThreadPool()) { in AsynchronousChannelGroupImpl()
92 return pool.executor(); in executor()
96 return pool.isFixedThreadPool(); in isFixedThreadPool()
101 return pool.poolSize(); in fixedThreadCount()
103 return pool.poolSize() + internalThreadCount; in fixedThreadCount()
136 if (pool.poolSize() > 0) {
139 for (int i=0; i<pool.poolSize(); i++) {
[all …]
DPort.java57 Port(AsynchronousChannelProvider provider, ThreadPool pool) { in Port() argument
58 super(provider, pool); in Port()
DEPollPort.java83 EPollPort(AsynchronousChannelProvider provider, ThreadPool pool) in EPollPort() argument
86 super(provider, pool); in EPollPort()
DSimpleAsynchronousFileChannelImpl.java68 ThreadPool pool) in open() argument
71 ExecutorService executor = (pool == null) ? in open()
72 DefaultExecutorHolder.defaultExecutor : pool.executor(); in open()
/libcore/ojluni/src/test/java/util/concurrent/tck/
DForkJoinTask8Test.java103 private void testInvokeOnPool(ForkJoinPool pool, RecursiveAction a) { in testInvokeOnPool() argument
104 try (PoolCleaner cleaner = cleaner(pool)) { in testInvokeOnPool()
112 assertNull(pool.invoke(a)); in testInvokeOnPool()
411 public void testInvoke(ForkJoinPool pool) {
418 testInvokeOnPool(pool, a);
432 public void testQuietlyInvoke(ForkJoinPool pool) {
439 testInvokeOnPool(pool, a);
451 public void testForkJoin(ForkJoinPool pool) {
459 testInvokeOnPool(pool, a);
471 public void testForkGet(ForkJoinPool pool) {
[all …]
DJSR166TestCase.java946 private final ExecutorService pool; field in JSR166TestCase.PoolCleaner
947 public PoolCleaner(ExecutorService pool) { this.pool = pool; } in PoolCleaner() argument
948 public void close() { joinPool(pool); } in close()
956 public PoolCleanerWithReleaser(ExecutorService pool, Runnable releaser) { in PoolCleanerWithReleaser() argument
957 super(pool); in PoolCleanerWithReleaser()
969 PoolCleaner cleaner(ExecutorService pool) { in cleaner() argument
970 return new PoolCleaner(pool); in cleaner()
973 PoolCleaner cleaner(ExecutorService pool, Runnable releaser) { in cleaner() argument
974 return new PoolCleanerWithReleaser(pool, releaser); in cleaner()
977 PoolCleaner cleaner(ExecutorService pool, CountDownLatch latch) { in cleaner() argument
[all …]
DLongAccumulatorTest.java150 final ExecutorService pool = Executors.newCachedThreadPool(); in testAccumulateAndGetMT() local
154 pool.execute(new AccTask(a, phaser, incs)); in testAccumulateAndGetMT()
160 pool.shutdown(); in testAccumulateAndGetMT()
DDoubleAdderTest.java162 final ExecutorService pool = Executors.newCachedThreadPool(); in testAddAndSumMT() local
166 pool.execute(new AdderTask(a, barrier, incs)); in testAddAndSumMT()
172 pool.shutdown(); in testAddAndSumMT()
DDoubleAccumulatorTest.java150 final ExecutorService pool = Executors.newCachedThreadPool(); in testAccumulateAndGetMT() local
154 pool.execute(new AccTask(a, phaser, incs)); in testAccumulateAndGetMT()
160 pool.shutdown(); in testAccumulateAndGetMT()
DLongAdderTest.java185 final ExecutorService pool = Executors.newCachedThreadPool(); in testAddAndSumMT() local
189 pool.execute(new AdderTask(a, barrier, incs)); in testAddAndSumMT()
195 pool.shutdown(); in testAddAndSumMT()
/libcore/jsr166-tests/src/test/java/jsr166/
DForkJoinTask8Test.java80 private void testInvokeOnPool(ForkJoinPool pool, RecursiveAction a) { in testInvokeOnPool() argument
81 try (PoolCleaner cleaner = cleaner(pool)) { in testInvokeOnPool()
89 assertNull(pool.invoke(a)); in testInvokeOnPool()
388 public void testInvoke(ForkJoinPool pool) {
395 testInvokeOnPool(pool, a);
409 public void testQuietlyInvoke(ForkJoinPool pool) {
416 testInvokeOnPool(pool, a);
428 public void testForkJoin(ForkJoinPool pool) {
436 testInvokeOnPool(pool, a);
448 public void testForkGet(ForkJoinPool pool) {
[all …]
DJSR166TestCase.java855 private final ExecutorService pool; field in JSR166TestCase.PoolCleaner
856 public PoolCleaner(ExecutorService pool) { this.pool = pool; } in PoolCleaner() argument
857 public void close() { joinPool(pool); } in close()
865 public PoolCleanerWithReleaser(ExecutorService pool, Runnable releaser) { in PoolCleanerWithReleaser() argument
866 super(pool); in PoolCleanerWithReleaser()
878 PoolCleaner cleaner(ExecutorService pool) { in cleaner() argument
879 return new PoolCleaner(pool); in cleaner()
882 PoolCleaner cleaner(ExecutorService pool, Runnable releaser) { in cleaner() argument
883 return new PoolCleanerWithReleaser(pool, releaser); in cleaner()
886 PoolCleaner cleaner(ExecutorService pool, CountDownLatch latch) { in cleaner() argument
[all …]
DCollection8Test.java82 final ExecutorService pool = Executors.newCachedThreadPool(); in testForEachConcurrentStressTest() local
83 try (PoolCleaner cleaner = cleaner(pool, done)) { in testForEachConcurrentStressTest()
95 f1 = pool.submit(checkElt); in testForEachConcurrentStressTest()
96 f2 = pool.submit(addRemove); in testForEachConcurrentStressTest()
DDoubleAccumulatorTest.java127 final ExecutorService pool = Executors.newCachedThreadPool(); in testAccumulateAndGetMT() local
131 pool.execute(new AccTask(a, phaser, incs)); in testAccumulateAndGetMT()
137 pool.shutdown(); in testAccumulateAndGetMT()
DLongAccumulatorTest.java127 final ExecutorService pool = Executors.newCachedThreadPool(); in testAccumulateAndGetMT() local
131 pool.execute(new AccTask(a, phaser, incs)); in testAccumulateAndGetMT()
137 pool.shutdown(); in testAccumulateAndGetMT()
DDoubleAdderTest.java139 final ExecutorService pool = Executors.newCachedThreadPool(); in testAddAndSumMT() local
143 pool.execute(new AdderTask(a, barrier, incs)); in testAddAndSumMT()
149 pool.shutdown(); in testAddAndSumMT()
DLongAdderTest.java162 final ExecutorService pool = Executors.newCachedThreadPool(); in testAddAndSumMT() local
166 pool.execute(new AdderTask(a, barrier, incs)); in testAddAndSumMT()
172 pool.shutdown(); in testAddAndSumMT()
/libcore/luni/src/main/java/libcore/internal/
DStringPool.java28 private final String[] pool = new String[512]; field in StringPool
58 int index = hashCode & (pool.length - 1); in get()
60 String pooled = pool[index]; in get()
66 pool[index] = result; in get()
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixChannelFactory.java157 ThreadPool pool) in newAsynchronousFileChannel() argument
173 return SimpleAsynchronousFileChannelImpl.open(fdObj, flags.read, flags.write, pool); in newAsynchronousFileChannel()

12