Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 174 for Runnable (0.16 sec)

  1. android/guava/src/com/google/common/util/concurrent/ExecutionList.java

                      + runnable
                      + " with executor "
                      + executor,
                  e);
        }
      }
    
      private static final class RunnableExecutorPair {
        final Runnable runnable;
        final Executor executor;
        @CheckForNull RunnableExecutorPair next;
    
        RunnableExecutorPair(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java

            }
          };
      private static final Runnable GOOD_RUNNABLE =
          new Runnable() {
            @Override
            public void run() {
              try {
                MILLISECONDS.sleep(DELAY_MS);
              } catch (InterruptedException e) {
                throw new RuntimeException(e);
              }
            }
          };
      private static final Runnable BAD_RUNNABLE =
          new Runnable() {
            @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.5K bytes
    - Viewed (0)
  3. guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java

      public void testSameThreadScheduledExecutorWithException() throws InterruptedException {
        Runnable runnable =
            new Runnable() {
              @Override
              public void run() {
                throw new RuntimeException("Oh no!");
              }
            };
    
        Future<?> future = TestingExecutors.sameThreadScheduledExecutor().submit(runnable);
        assertThrows(ExecutionException.class, () -> future.get());
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java

            }
          };
      private static final Runnable GOOD_RUNNABLE =
          new Runnable() {
            @Override
            public void run() {
              try {
                MILLISECONDS.sleep(DELAY_MS);
              } catch (InterruptedException e) {
                throw new RuntimeException(e);
              }
            }
          };
      private static final Runnable BAD_RUNNABLE =
          new Runnable() {
            @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java

      }
    
      @Override
      @SuppressWarnings("CatchingUnchecked") // sneaky checked exception
      public void runWithTimeout(Runnable runnable, long timeoutDuration, TimeUnit timeoutUnit) {
        checkNotNull(runnable);
        checkNotNull(timeoutUnit);
        try {
          runnable.run();
        } catch (Exception e) { // sneaky checked exception
          throw new UncheckedExecutionException(e);
        } catch (Error e) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/AbstractTester.java

     */
    @GwtCompatible(emulated = true)
    @ElementTypesAreNonnullByDefault
    public class AbstractTester<G> extends TestCase {
      private G subjectGenerator;
      private String suiteName;
      private @Nullable Runnable setUp;
      private @Nullable Runnable tearDown;
    
      // public so that it can be referenced in generated GWT tests.
      @Override
      public void setUp() throws Exception {
        if (setUp != null) {
          setUp.run();
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/reflect/ReflectionTest.java

        assertEquals("java.util", Reflection.getPackageName(Map.Entry.class));
      }
    
      public void testNewProxy() throws Exception {
        Runnable runnable = Reflection.newProxy(Runnable.class, X_RETURNER);
        assertEquals("x", runnable.toString());
      }
    
      public void testNewProxyCantWorkOnAClass() throws Exception {
        assertThrows(
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 2.7K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/reflect/ReflectionTest.java

        assertEquals("java.util", Reflection.getPackageName(Map.Entry.class));
      }
    
      public void testNewProxy() throws Exception {
        Runnable runnable = Reflection.newProxy(Runnable.class, X_RETURNER);
        assertEquals("x", runnable.toString());
      }
    
      public void testNewProxyCantWorkOnAClass() throws Exception {
        assertThrows(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 2.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java

        }
      }
    
      @Override
      public void runWithTimeout(Runnable runnable, long timeoutDuration, TimeUnit timeoutUnit)
          throws TimeoutException, InterruptedException {
        checkNotNull(runnable);
        checkNotNull(timeoutUnit);
        checkPositiveTimeout(timeoutDuration);
    
        Future<?> future = executor.submit(runnable);
    
        try {
          future.get(timeoutDuration, timeoutUnit);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 27 14:21:11 GMT 2023
    - 9.7K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

                      return counter.incrementAndGet();
                    }
                  });
          final CyclicBarrier barrier = new CyclicBarrier(numThreads + 1);
          Runnable wrapper =
              new Runnable() {
                @Override
                public void run() {
                  awaitUnchecked(barrier);
                  task.run();
                  awaitUnchecked(barrier);
                }
              };
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
Back to top