- Sort Score
- Num 10 results
- Language All
Results 171 - 180 of 501 for runnable (0.22 seconds)
-
android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java
} finally { monitor.leave(); } }); awaitUninterruptibly(enteredLatch); } @CanIgnoreReturnValue static Thread startThread(Runnable runnable) { Thread thread = new Thread(runnable); thread.setDaemon(true); thread.start(); return thread; } /** * Generates a test case verifying that calling any enterXxx, tryEnterXxx, or waitForXxx methodCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 26.7K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java
}; addCallback(f, callback, directExecutor()); } private static final class CountingSameThreadExecutor implements Executor { int runCount = 0; @Override public void execute(Runnable command) { command.run(); runCount++; } } private static final class MockCallback implements FutureCallback<String> { @Nullable private String value = null;Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 15:59:55 GMT 2026 - 6.7K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/AbstractIdleService.java
* this method to use a custom {@link Executor}, which may configure its worker thread with a * specific name, thread group or priority. The returned executor's {@link * Executor#execute(Runnable) execute()} method is called when this service is started and * stopped, and should return promptly. */ protected Executor executor() { return command -> newThread(threadNameSupplier.get(), command).start();Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Jul 11 18:52:30 GMT 2025 - 5.5K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java
@SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. static void awaitWaiting(Thread t) { while (true) { Thread.State state = t.getState(); switch (state) { case RUNNABLE: case BLOCKED: Thread.yield(); break; case WAITING: return; default: throw new AssertionError("unexpected state: " + state); }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Mar 07 02:20:33 GMT 2026 - 13.8K bytes - Click Count (0) -
android/guava/src/com/google/common/base/FinalizableReferenceQueue.java
* ... * this.serverSocket = new ServerSocket(...); * this.cleanable = cleaner.register(this, closeServerSocketRunnable(serverSocket)); * ... * } * * private static Runnable closeServerSocketRunnable(ServerSocket serverSocket) { * return () -> { * if (!serverSocket.isClosed()) { * ...log a message about how nobody called close()... * try {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 19:26:59 GMT 2026 - 15.8K bytes - Click Count (0) -
guava/src/com/google/common/base/FinalizableReferenceQueue.java
* ... * this.serverSocket = new ServerSocket(...); * this.cleanable = cleaner.register(this, closeServerSocketRunnable(serverSocket)); * ... * } * * private static Runnable closeServerSocketRunnable(ServerSocket serverSocket) { * return () -> { * if (!serverSocket.isClosed()) { * ...log a message about how nobody called close()... * try {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 19:26:59 GMT 2026 - 15.8K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java
this.adapterExecutor = checkNotNull(adapterExecutor); } @Override protected Future<V> delegate() { return delegate; } @Override public void addListener(Runnable listener, Executor exec) { executionList.add(listener, exec); // When a listener is first added, we run a task that will wait for the delegate to finish, // and when it is done will run the listeners.
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Jul 17 15:26:41 GMT 2025 - 7.5K bytes - Click Count (0) -
guava/src/com/google/common/base/internal/Finalizer.java
* collected, and this class can detect when the main class loader has been garbage collected and * stop itself. */ public class Finalizer implements Runnable { private static final Logger logger = Logger.getLogger(Finalizer.class.getName()); /** * Starts the Finalizer thread. FinalizableReferenceQueue calls this method reflectively. *Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 11 03:19:29 GMT 2026 - 9.6K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractIdleServiceTest.java
Service service = new TestService() { @Override protected Executor executor() { return new Executor() { @Override public void execute(Runnable command) {} }; } @Override protected String serviceName() { return "Foo"; } }; TimeoutException e =Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 7.7K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java
} @SuppressWarnings("Java8ApiChecker") static class MyServerExampleWithCleaner implements AutoCloseable { private static final Cleaner cleaner = Cleaner.create(); private static Runnable closeServerSocketRunnable( ServerSocket serverSocket, AtomicBoolean cleanerRan) { return () -> { try { serverSocket.close(); cleanerRan.set(true);Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Feb 27 21:20:19 GMT 2026 - 8.6K bytes - Click Count (0)