- Sort Score
- Result 10 results
- Languages All
Results 11 - 19 of 19 for newSingleThreadExecutor (0.22 sec)
-
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) -
guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
private static final long HALF_SECOND_NANOS = NANOSECONDS.convert(1L, SECONDS) / 2; public void testShutdownAndAwaitTermination_immediateShutdown() throws Exception { ExecutorService service = Executors.newSingleThreadExecutor(); assertTrue(shutdownAndAwaitTermination(service, 1L, SECONDS)); assertTrue(service.isTerminated()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 28.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/MoreFilesTest.java
Path dirToDelete = fs.getPath("dir/b/i"); Path changingFile = dirToDelete.resolve("j/l"); Path symlinkTarget = fs.getPath("/dontdelete"); ExecutorService executor = Executors.newSingleThreadExecutor(); startDirectorySymlinkSwitching(changingFile, symlinkTarget, executor); try { for (int i = 0; i < iterations; i++) { try {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 27.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/MoreFilesTest.java
Path dirToDelete = fs.getPath("dir/b/i"); Path changingFile = dirToDelete.resolve("j/l"); Path symlinkTarget = fs.getPath("/dontdelete"); ExecutorService executor = Executors.newSingleThreadExecutor(); startDirectorySymlinkSwitching(changingFile, symlinkTarget, executor); try { for (int i = 0; i < iterations; i++) { try {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 16:07:00 UTC 2024 - 26.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
private static final long HALF_SECOND_NANOS = NANOSECONDS.convert(1L, SECONDS) / 2; public void testShutdownAndAwaitTermination_immediateShutdown() throws Exception { ExecutorService service = Executors.newSingleThreadExecutor(); assertTrue(shutdownAndAwaitTermination(service, 1L, SECONDS)); assertTrue(service.isTerminated()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 28.1K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/MoreExecutors.java
* despite not throwing a RejectedExecutionException synchronously with the call to {@code * execute}. If this behaviour is problematic, use an Executor with a single thread (e.g. {@link * Executors#newSingleThreadExecutor}). * * @since 23.3 (since 23.1 as {@code sequentialExecutor}) */ @GwtIncompatible public static Executor newSequentialExecutor(Executor delegate) { return new SequentialExecutor(delegate);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 44.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/LocalCacheTest.java
import static com.google.common.util.concurrent.MoreExecutors.listeningDecorator; import static java.lang.Math.max; import static java.lang.Thread.State.WAITING; import static java.util.concurrent.Executors.newSingleThreadExecutor; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.NANOSECONDS; import static java.util.concurrent.TimeUnit.SECONDS;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 110.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/LocalCacheTest.java
import static com.google.common.util.concurrent.MoreExecutors.listeningDecorator; import static java.lang.Math.max; import static java.lang.Thread.State.WAITING; import static java.util.concurrent.Executors.newSingleThreadExecutor; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.NANOSECONDS; import static java.util.concurrent.TimeUnit.SECONDS;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 112.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
.body("def") .throttleBody(1, 750, TimeUnit.MILLISECONDS) .build(), ) val call = client.newCall(Request(server.url("/a"))) val executor = Executors.newSingleThreadExecutor() val result = executor.submit<Response?> { call.execute() } Thread.sleep(100) // wait for it to go in flight. call.cancel() assertFailsWith<IOException> { result.get()!!.body.bytes()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 142.5K bytes - Viewed (0)