Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for Command (0.42 sec)

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

       * to the string returned by {@link #serviceName}
       */
      protected Executor executor() {
        return command -> MoreExecutors.newThread(serviceName(), command).start();
      }
    
      @Override
      public String toString() {
        return serviceName() + " [" + state() + "]";
      }
    
      @Override
      public final boolean isRunning() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/util/concurrent/testing/TestingExecutors.java

        }
    
        @Override
        public ListenableScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
          return NeverScheduledFuture.create();
        }
    
        @Override
        public ListenableScheduledFuture<?> scheduleAtFixedRate(
            Runnable command, long initialDelay, long period, TimeUnit unit) {
          return NeverScheduledFuture.create();
        }
    
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 26 22:04:00 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

        @GuardedBy("lock")
        private int runningTasks = 0;
    
        @GuardedBy("lock")
        private boolean shutdown = false;
    
        @Override
        public void execute(Runnable command) {
          startTask();
          try {
            command.run();
          } finally {
            endTask();
          }
        }
    
        @Override
        public boolean isShutdown() {
          synchronized (lock) {
            return shutdown;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java

        }
      }
    
      private static final class Listener {
        final Runnable command;
        final Executor executor;
    
        Listener(Runnable command, Executor executor) {
          this.command = checkNotNull(command);
          this.executor = checkNotNull(executor);
        }
    
        void execute() {
          try {
            executor.execute(command);
          } catch (RuntimeException e) {
            log.log(
                Level.SEVERE,
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 19:37:41 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java

          new ScheduledThreadPoolExecutor(10) {
            @Override
            public ScheduledFuture<?> scheduleWithFixedDelay(
                Runnable command, long initialDelay, long delay, TimeUnit unit) {
              return future = super.scheduleWithFixedDelay(command, initialDelay, delay, unit);
            }
          };
    
      public void testServiceStartStop() throws Exception {
        NullService service = new NullService();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

      private Throwable thrownByExecutionThread;
      private final Executor exceptionCatchingExecutor =
          new Executor() {
            @Override
            public void execute(Runnable command) {
              executionThread = new Thread(command);
              executionThread.setUncaughtExceptionHandler(
                  new UncaughtExceptionHandler() {
                    @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/util/concurrent/testing/TestingExecutors.java

        }
    
        @Override
        public ListenableScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
          return NeverScheduledFuture.create();
        }
    
        @Override
        public ListenableScheduledFuture<?> scheduleAtFixedRate(
            Runnable command, long initialDelay, long period, TimeUnit unit) {
          return NeverScheduledFuture.create();
        }
    
        @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri May 26 22:04:00 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

      private static class FakeExecutor implements Executor {
        Queue<Runnable> tasks = Queues.newArrayDeque();
    
        @Override
        public void execute(Runnable command) {
          tasks.add(command);
        }
    
        boolean hasNext() {
          return !tasks.isEmpty();
        }
    
        void runNext() {
          assertTrue("expected at least one task to run", hasNext());
          tasks.remove().run();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java

          new ScheduledThreadPoolExecutor(10) {
            @Override
            public ScheduledFuture<?> scheduleWithFixedDelay(
                Runnable command, long initialDelay, long delay, TimeUnit unit) {
              return future = super.scheduleWithFixedDelay(command, initialDelay, delay, unit);
            }
          };
    
      public void testServiceStartStop() throws Exception {
        NullService service = new NullService();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/AbstractIdleServiceTest.java

      public void testTimeout() throws Exception {
        // Create a service whose executor will never run its commands
        Service service =
            new TestService() {
              @Override
              protected Executor executor() {
                return new Executor() {
                  @Override
                  public void execute(Runnable command) {}
                };
              }
    
              @Override
    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)
Back to top