Home
last modified time | relevance | path

Searched refs:executor (Results 1 – 23 of 23) sorted by relevance

/libcore/luni/src/main/java/java/util/concurrent/
DExecutorCompletionService.java79 private final Executor executor; field in ExecutorCompletionService
117 public ExecutorCompletionService(Executor executor) { in ExecutorCompletionService() argument
118 if (executor == null) in ExecutorCompletionService()
120 this.executor = executor; in ExecutorCompletionService()
121 this.aes = (executor instanceof AbstractExecutorService) ? in ExecutorCompletionService()
122 (AbstractExecutorService) executor : null; in ExecutorCompletionService()
139 public ExecutorCompletionService(Executor executor, in ExecutorCompletionService() argument
141 if (executor == null || completionQueue == null) in ExecutorCompletionService()
143 this.executor = executor; in ExecutorCompletionService()
144 this.aes = (executor instanceof AbstractExecutorService) ? in ExecutorCompletionService()
[all …]
DExecutors.java287 public static ExecutorService unconfigurableExecutorService(ExecutorService executor) { in unconfigurableExecutorService() argument
288 if (executor == null) in unconfigurableExecutorService()
290 return new DelegatedExecutorService(executor); in unconfigurableExecutorService()
303 …cheduledExecutorService unconfigurableScheduledExecutorService(ScheduledExecutorService executor) { in unconfigurableScheduledExecutorService() argument
304 if (executor == null) in unconfigurableScheduledExecutorService()
306 return new DelegatedScheduledExecutorService(executor); in unconfigurableScheduledExecutorService()
582 DelegatedExecutorService(ExecutorService executor) { e = executor; }
623 FinalizableDelegatedExecutorService(ExecutorService executor) {
624 super(executor);
639 DelegatedScheduledExecutorService(ScheduledExecutorService executor) {
[all …]
DRejectedExecutionHandler.java32 void rejectedExecution(Runnable r, ThreadPoolExecutor executor); in rejectedExecution() argument
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DSSLSocketTest.java319 ExecutorService executor = Executors.newSingleThreadExecutor(); in test_SSLSocket_startHandshake() local
320 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake()
340 executor.shutdown(); in test_SSLSocket_startHandshake()
372 final ExecutorService executor = Executors.newSingleThreadExecutor(); in test_SSLSocket_confirmSessionReuse() local
377 final Future<byte[]> future1 = executor.submit(new SSLServerSessionIdCallable(server1)); in test_SSLSocket_confirmSessionReuse()
390 final Future<byte[]> future2 = executor.submit(new SSLServerSessionIdCallable(server2)); in test_SSLSocket_confirmSessionReuse()
402 executor.shutdown(); in test_SSLSocket_confirmSessionReuse()
412 ExecutorService executor = Executors.newSingleThreadExecutor(); in test_SSLSocket_startHandshake_noKeyStore() local
413 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake_noKeyStore()
423 executor.shutdown(); in test_SSLSocket_startHandshake_noKeyStore()
[all …]
/libcore/support/src/test/java/libcore/javax/net/ssl/
DTestSSLSocketPair.java79 ExecutorService executor = Executors.newFixedThreadPool(2); in connect() local
80 Future s = executor.submit(new Callable<Void>() { in connect()
89 Future c = executor.submit(new Callable<Void>() { in connect()
98 executor.shutdown(); in connect()
/libcore/luni/src/test/java/tests/security/
DSecureRandomTest.java79 ExecutorService executor = Executors.newFixedThreadPool(threads); in testSecureRandomThreadSafety() local
80 ExecutorCompletionService ecs = new ExecutorCompletionService(executor); in testSecureRandomThreadSafety()
91 executor.shutdown(); in testSecureRandomThreadSafety()
/libcore/luni/src/test/java/libcore/java/lang/ref/
DReferenceQueueTest.java93 ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1); in runLater() local
94 executor.schedule(runnable, delayMillis, TimeUnit.MILLISECONDS); in runLater()
95 executor.shutdown(); in runLater()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DOutputStreamTesterTest.java116 private ExecutorService executor; field in OutputStreamTesterTest.PipedOutputStreamSinkTester
123 executor = Executors.newSingleThreadExecutor(); in create()
124 future = executor.submit(new Callable<byte[]>() { in create()
141 executor.shutdown(); in getBytes()
DWriterTesterTest.java109 private ExecutorService executor; field in WriterTesterTest.PipedWriterCharSinkTester
116 executor = Executors.newSingleThreadExecutor(); in create()
117 future = executor.submit(new Callable<char[]>() { in create()
135 executor.shutdown(); in getChars()
/libcore/luni/src/test/java/libcore/java/util/zip/
DDeflaterOutputStreamTest.java72 ExecutorService executor = Executors.newSingleThreadExecutor(); in createInflaterStream() local
76 executor.submit(new Callable<Void>() { in createInflaterStream()
93 executor.shutdown(); in createInflaterStream()
/libcore/jsr166-tests/src/test/java/jsr166/
DSynchronousQueueTest.java457 ExecutorService executor = Executors.newFixedThreadPool(2);
460 executor.execute(new CheckedRunnable() {
468 executor.execute(new CheckedRunnable() {
474 joinPool(executor);
485 ExecutorService executor = Executors.newFixedThreadPool(2);
486 executor.execute(new CheckedRunnable() {
494 executor.execute(new CheckedRunnable() {
500 joinPool(executor);
DLinkedBlockingQueueTest.java688 ExecutorService executor = Executors.newFixedThreadPool(2); in testOfferInExecutor() local
690 executor.execute(new CheckedRunnable() { in testOfferInExecutor()
698 executor.execute(new CheckedRunnable() { in testOfferInExecutor()
704 joinPool(executor); in testOfferInExecutor()
713 ExecutorService executor = Executors.newFixedThreadPool(2); in testPollInExecutor() local
714 executor.execute(new CheckedRunnable() { in testPollInExecutor()
722 executor.execute(new CheckedRunnable() { in testPollInExecutor()
728 joinPool(executor); in testPollInExecutor()
DExecutorsTest.java267 for (final ExecutorService executor : executors) { in testTimedCallable()
271 Future future = executor.submit(sleeper); in testTimedCallable()
277 for (ExecutorService executor : executors) in testTimedCallable()
278 joinPool(executor); in testTimedCallable()
DArrayBlockingQueueTest.java754 ExecutorService executor = Executors.newFixedThreadPool(2); in testOfferInExecutor() local
756 executor.execute(new CheckedRunnable() { in testOfferInExecutor()
764 executor.execute(new CheckedRunnable() { in testOfferInExecutor()
771 joinPool(executor); in testOfferInExecutor()
780 ExecutorService executor = Executors.newFixedThreadPool(2); in testPollInExecutor() local
781 executor.execute(new CheckedRunnable() { in testPollInExecutor()
789 executor.execute(new CheckedRunnable() { in testPollInExecutor()
795 joinPool(executor); in testPollInExecutor()
DLinkedTransferQueueTest.java569 ExecutorService executor = Executors.newFixedThreadPool(2); in testOfferInExecutor() local
571 executor.execute(new CheckedRunnable() { in testOfferInExecutor()
577 executor.execute(new CheckedRunnable() { in testOfferInExecutor()
584 joinPool(executor); in testOfferInExecutor()
593 ExecutorService executor = Executors.newFixedThreadPool(2); in testPollInExecutor() local
595 executor.execute(new CheckedRunnable() { in testPollInExecutor()
603 executor.execute(new CheckedRunnable() { in testPollInExecutor()
609 joinPool(executor); in testPollInExecutor()
DPriorityBlockingQueueTest.java602 ExecutorService executor = Executors.newFixedThreadPool(2); in testPollInExecutor() local
603 executor.execute(new CheckedRunnable() { in testPollInExecutor()
611 executor.execute(new CheckedRunnable() { in testPollInExecutor()
617 joinPool(executor); in testPollInExecutor()
DDelayQueueTest.java641 ExecutorService executor = Executors.newFixedThreadPool(2); in testPollInExecutor() local
642 executor.execute(new CheckedRunnable() { in testPollInExecutor()
650 executor.execute(new CheckedRunnable() { in testPollInExecutor()
656 joinPool(executor); in testPollInExecutor()
DLinkedBlockingDequeTest.java1633 ExecutorService executor = Executors.newFixedThreadPool(2);
1635 executor.execute(new CheckedRunnable() {
1643 executor.execute(new CheckedRunnable() {
1649 joinPool(executor);
1658 ExecutorService executor = Executors.newFixedThreadPool(2);
1659 executor.execute(new CheckedRunnable() {
1667 executor.execute(new CheckedRunnable() {
1673 joinPool(executor);
DJSR166TestCase.java1033 ThreadPoolExecutor executor) {}
/libcore/support/src/test/java/tests/http/
DMockWebServer.java77 private ExecutorService executor; field in MockWebServer
177 executor = Executors.newCachedThreadPool(); in play()
182 executor.execute(namedRunnable("MockWebServer-accept-" + port, new Runnable() { in play()
208 executor.shutdown(); in play()
243 executor.execute(namedRunnable(name, new Runnable() { in serveConnection()
/libcore/luni/src/test/java/libcore/java/net/
DSocketTest.java357 private ExecutorService executor; field in SocketTest.MockServer
362 executor = Executors.newCachedThreadPool(); in MockServer()
370 return executor.submit(new Callable<byte[]>() { in enqueue()
390 executor.shutdown(); in shutdown()
/libcore/luni/src/test/java/libcore/java/util/concurrent/
DCopyOnWriteArrayListTest.java179 ExecutorService executor = Executors.newSingleThreadExecutor(); in testAddAllIsAtomic() local
180 Future<?> future = executor.submit(new Runnable() { in testAddAllIsAtomic()
189 executor.shutdown(); in testAddAllIsAtomic()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/
DJarFileTest.java677 ExecutorService executor = Executors.newSingleThreadExecutor(); in checkSignedJar() local
678 Future<Boolean> future = executor.submit(new Callable<Boolean>() { in checkSignedJar()
701 executor.shutdown(); in checkSignedJar()