- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for newSingleThreadExecutor (0.17 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToValueAndCloserTest.java
import static com.google.common.util.concurrent.MoreExecutors.shutdownAndAwaitTermination; import static com.google.common.util.concurrent.Uninterruptibles.awaitUninterruptibly; import static java.util.concurrent.Executors.newSingleThreadExecutor; import static java.util.concurrent.TimeUnit.SECONDS; import static org.junit.Assert.assertThrows; import com.google.common.util.concurrent.ClosingFuture.ClosingCallable;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 5.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToValueAndCloserTest.java
import static com.google.common.util.concurrent.MoreExecutors.shutdownAndAwaitTermination; import static com.google.common.util.concurrent.Uninterruptibles.awaitUninterruptibly; import static java.util.concurrent.Executors.newSingleThreadExecutor; import static java.util.concurrent.TimeUnit.SECONDS; import static org.junit.Assert.assertThrows; import com.google.common.util.concurrent.ClosingFuture.ClosingCallable;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 5.7K bytes - Viewed (0) -
okhttp-android/src/main/kotlin/okhttp3/android/AndroidAsyncDns.kt
private val network: Network? = null, ) : AsyncDns { @RequiresApi(Build.VERSION_CODES.Q) internal val resolver = DnsResolver.getInstance() private val executor = Executors.newSingleThreadExecutor() override fun query( hostname: String, callback: AsyncDns.Callback, ) { try { resolver.query( network, hostname, dnsClass.type,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 10:07:48 UTC 2024 - 2.8K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java
public void testGetBlocksUntilValueAvailable() throws Throwable { assertFalse(future.isDone()); assertFalse(future.isCancelled()); ExecutorService executor = Executors.newSingleThreadExecutor(); try { Future<Boolean> getResult = executor.submit(() -> future.get()); // Release the future value. latch.countDown(); assertTrue(getResult.get(10, SECONDS));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 18:30:30 UTC 2023 - 6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java
} private class FakeService extends AbstractExecutionThreadService implements TearDown { private final ExecutorService executor = Executors.newSingleThreadExecutor(); FakeService() { tearDownStack.addTearDown(this); } volatile int startupCalled = 0; volatile int shutdownCalled = 0; volatile int runCalled = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 12.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt
private val outFrames: MutableList<OutFrame> = ArrayList() private val inFrames: BlockingQueue<InFrame> = LinkedBlockingQueue() private var port = 0 private val executor = Executors.newSingleThreadExecutor(threadFactory("MockHttp2Peer")) private var serverSocket: ServerSocket? = null private var socket: Socket? = null fun setClient(client: Boolean) { if (this.client == client) return
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 8.7K bytes - Viewed (0) -
guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java
public void testGetBlocksUntilValueAvailable() throws Throwable { assertFalse(future.isDone()); assertFalse(future.isCancelled()); ExecutorService executor = Executors.newSingleThreadExecutor(); try { Future<Boolean> getResult = executor.submit(() -> future.get()); // Release the future value. latch.countDown(); assertTrue(getResult.get(10, SECONDS));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 18:30:30 UTC 2023 - 6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java
class MyError extends Error {} final CyclicBarrier barrier = new CyclicBarrier(2); // we need to make sure the error gets thrown on a different thread. ExecutorService service = Executors.newSingleThreadExecutor(); try { final SequentialExecutor executor = new SequentialExecutor(service); Runnable errorTask = new Runnable() { @Override public void run() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 11.4K bytes - Viewed (0) -
src/test/java/jcifs/tests/WatchTest.java
return getConfigs("smb1", "smb2", "smb30", "smb31"); } @Override @Before public void setUp () throws Exception { super.setUp(); this.executor = Executors.newSingleThreadExecutor(); this.base = createTestDirectory(); } @Override @After public void tearDown () throws Exception { if ( this.executor != null ) {
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 8.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java
} private class FakeService extends AbstractExecutionThreadService implements TearDown { private final ExecutorService executor = Executors.newSingleThreadExecutor(); FakeService() { tearDownStack.addTearDown(this); } volatile int startupCalled = 0; volatile int shutdownCalled = 0; volatile int runCalled = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 12.7K bytes - Viewed (0)