- Sort Score
- Num 10 results
- Language All
Results 121 - 130 of 470 for executors (0.15 seconds)
-
android/guava-tests/test/com/google/common/graph/ValueGraphTest.java
graph.putEdgeValue(5, 6, "C"); int threadCount = 20; ExecutorService executor = newFixedThreadPool(threadCount); CyclicBarrier barrier = new CyclicBarrier(threadCount); ImmutableList.Builder<Future<?>> futures = ImmutableList.builder(); for (int i = 0; i < threadCount; i++) { futures.add( executor.submit( () -> { barrier.await();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 19:26:39 GMT 2026 - 17.9K bytes - Click Count (0) -
docs/recipes.md
=== ":material-language-kotlin: Kotlin" ```kotlin private val executor = Executors.newScheduledThreadPool(1) private val client = OkHttpClient() fun run() { val request = Request.Builder()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:01:42 GMT 2026 - 47.8K bytes - Click Count (0) -
guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java
import static com.google.common.collect.CollectPreconditions.checkNonnegative; import static com.google.common.collect.Lists.newArrayListWithExpectedSize; import static java.util.concurrent.Executors.newFixedThreadPool; import com.google.caliper.BeforeExperiment; import com.google.caliper.Benchmark; import com.google.caliper.Param; import com.google.common.annotations.VisibleForTesting;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Jul 14 14:44:08 GMT 2025 - 16.6K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java
public String get(long time, TimeUnit unit) { throw new CancellationException(); // BAD!! } @Override public void addListener(Runnable runnable, Executor executor) { executor.execute(runnable); } }; future.setFuture(badFuture); ExecutionException expected = getExpectingExecutionException(future);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 45.2K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
import java.security.cert.Certificate import java.security.cert.X509Certificate import java.time.Duration import java.time.Instant import java.util.Date import java.util.concurrent.ExecutorService import java.util.concurrent.Executors import java.util.concurrent.TimeUnit import javax.net.ServerSocketFactory import javax.net.SocketFactory import javax.net.ssl.HostnameVerifier import javax.net.ssl.SSLContext import javax.net.ssl.SSLSocket
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 49.7K bytes - Click Count (0) -
guava-tests/test/com/google/common/graph/ValueGraphTest.java
graph.putEdgeValue(5, 6, "C"); int threadCount = 20; ExecutorService executor = newFixedThreadPool(threadCount); CyclicBarrier barrier = new CyclicBarrier(threadCount); ImmutableList.Builder<Future<?>> futures = ImmutableList.builder(); for (int i = 0; i < threadCount; i++) { futures.add( executor.submit( () -> { barrier.await();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 19:26:39 GMT 2026 - 20.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/io/MoreFilesTest.java
Path changingFile = dirToDelete.resolve("j/l"); Path symlinkTarget = fs.getPath("/dontdelete"); ExecutorService executor = newSingleThreadExecutor(); Future<?> switcher = startDirectorySymlinkSwitching(changingFile, symlinkTarget, executor); try { for (int i = 0; i < iterations; i++) { try { Files.createDirectories(changingFile);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 19:26:39 GMT 2026 - 27.5K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/io/MoreFilesTest.java
Path changingFile = dirToDelete.resolve("j/l"); Path symlinkTarget = fs.getPath("/dontdelete"); ExecutorService executor = newSingleThreadExecutor(); Future<?> switcher = startDirectorySymlinkSwitching(changingFile, symlinkTarget, executor); try { for (int i = 0; i < iterations; i++) { try { Files.createDirectories(changingFile);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 19:26:39 GMT 2026 - 26.6K bytes - Click Count (0) -
src/main/java/jcifs/util/SecureKeyManager.java
private final Map<String, Integer> keyVersions = new ConcurrentHashMap<>(); private final java.util.concurrent.ScheduledExecutorService rotationScheduler = java.util.concurrent.Executors.newSingleThreadScheduledExecutor(r -> { Thread t = new Thread(r, "SecureKeyManager-Rotation"); t.setDaemon(true); return t; });
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 21.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java
ClosingFuture<String> closingFuture = ClosingFuture.from(executor.submit(Callables.returning(closeable1))) .transform( (DeferredCloser closer, TestCloseable v) -> { assertThat(v).isSameInstanceAs(closeable1); return "value"; }, executor); assertThat(getFinalValue(closingFuture)).isEqualTo("value");
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 63K bytes - Click Count (0)