Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 379 for Runnable (0.2 sec)

  1. okhttp/src/test/java/okhttp3/RecordingExecutor.kt

      private val dispatcherTest: DispatcherTest,
    ) : AbstractExecutorService() {
      private var shutdown: Boolean = false
      private val calls = mutableListOf<RealCall.AsyncCall>()
    
      override fun execute(command: Runnable) {
        if (shutdown) throw RejectedExecutionException()
        calls.add(command as RealCall.AsyncCall)
      }
    
      fun assertJobs(vararg expectedUrls: String) {
        val actualUrls = calls.map { it.request.url.toString() }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

              @Override
              public String get(long time, TimeUnit unit) {
                return "foo"; // BAD!!
              }
    
              @Override
              public void addListener(Runnable runnable, Executor executor) {
                executor.execute(runnable);
              }
            };
        Future<?> future = newFutureInstance();
        future
            .getClass()
            .getMethod(
                "setFuture",
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  3. guava-testlib/test/com/google/common/testing/ClassSanityTesterTest.java

            return s == that.s;
          }
          return false;
        }
      }
    
      static class SameInterfaceInstance {
        private final Runnable s;
    
        public SameInterfaceInstance(Runnable s) {
          this.s = checkNotNull(s);
        }
    
        @Override
        public int hashCode() {
          return s.hashCode();
        }
    
        @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 36.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/ThreadFactoryBuilderTest.java

    /**
     * Tests for ThreadFactoryBuilder.
     *
     * @author Kurt Alfred Kluever
     * @author Martin Buchholz
     */
    public class ThreadFactoryBuilderTest extends TestCase {
      private final Runnable monitoredRunnable =
          new Runnable() {
            @Override
            public void run() {
              completed = true;
            }
          };
    
      private static final UncaughtExceptionHandler UNCAUGHT_EXCEPTION_HANDLER =
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/ListeningExecutorServiceTest.java

          return true;
        }
    
        @Override
        public void execute(Runnable runnable) {
          throw new UnsupportedOperationException();
        }
    
        @Override
        public void shutdown() {
          throw new UnsupportedOperationException();
        }
    
        @Override
        public List<Runnable> shutdownNow() {
          throw new UnsupportedOperationException();
        }
    
        @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Fri Jun 02 12:45:23 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java

        return new Callable<T>() {
          @Override
          public T call() throws Exception {
            throw exception;
          }
        };
      }
    
      private static Runnable runnableThrowing(final RuntimeException e) {
        return new Runnable() {
          @Override
          public void run() {
            throw e;
          }
        };
      }
    
      @SuppressWarnings("serial")
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java

      private TimeoutFuture(ListenableFuture<V> delegate) {
        this.delegateRef = Preconditions.checkNotNull(delegate);
      }
    
      /** A runnable that is called when the delegate or the timer completes. */
      private static final class Fire<V extends @Nullable Object> implements Runnable {
        @CheckForNull @LazyInit TimeoutFuture<V> timeoutFutureRef;
    
        Fire(TimeoutFuture<V> timeoutFuture) {
          this.timeoutFutureRef = timeoutFuture;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilJvm.kt

      }
    
      @JvmStatic
      fun threadFactory(name: String): ThreadFactory {
        return object : ThreadFactory {
          private var nextId = 1
    
          override fun newThread(runnable: Runnable): Thread {
            return Thread(runnable, "$name-${nextId++}")
          }
        }
      }
    }
    
    fun getEnv(name: String) = System.getenv(name)
    
    val SYSTEM_FILE_SYSTEM = FileSystem.SYSTEM
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt

      private val loggingUncaughtExceptionHandler =
        UncaughtExceptionHandler { _, throwable ->
          log.put("uncaught exception: $throwable")
        }
    
      private val threadFactory =
        ThreadFactory { runnable ->
          Thread(runnable, "TaskRunnerRealBackendTest").apply {
            isDaemon = true
            uncaughtExceptionHandler = loggingUncaughtExceptionHandler
          }
        }
    
      private val backend = TaskRunner.RealBackend(threadFactory)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  10. futures/listenablefuture1/src/com/google/common/util/concurrent/ListenableFuture.java

     *
     * <pre>{@code
     * final String name = ...;
     * inFlight.add(name);
     * ListenableFuture<Result> future = service.query(name);
     * future.addListener(new Runnable() {
     *   public void run() {
     *     processedCount.incrementAndGet();
     *     inFlight.remove(name);
     *     lastProcessed.set(name);
     *     logger.info("Done with {0}", name);
     *   }
     * }, executor);
     * }</pre>
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:13:41 GMT 2023
    - 8K bytes
    - Viewed (0)
Back to top