Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 55 for shutdown (0.18 sec)

  1. android/guava-testlib/src/com/google/common/util/concurrent/testing/TestingExecutors.java

        private volatile boolean shutdown;
    
        @Override
        public void shutdown() {
          shutdown = true;
        }
    
        @Override
        public List<Runnable> shutdownNow() {
          shutdown();
          return ImmutableList.of();
        }
    
        @Override
        public boolean isShutdown() {
          return shutdown;
        }
    
        @Override
        public boolean isTerminated() {
    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)
  2. guava-testlib/src/com/google/common/util/concurrent/testing/TestingExecutors.java

        private volatile boolean shutdown;
    
        @Override
        public void shutdown() {
          shutdown = true;
        }
    
        @Override
        public List<Runnable> shutdownNow() {
          shutdown();
          return ImmutableList.of();
        }
    
        @Override
        public boolean isShutdown() {
          return shutdown;
        }
    
        @Override
        public boolean isTerminated() {
    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)
  3. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

        private final Object lock = new Object();
    
        /*
         * Conceptually, these two variables describe the executor being in
         * one of three states:
         *   - Active: shutdown == false
         *   - Shutdown: runningTasks > 0 and shutdown == true
         *   - Terminated: runningTasks == 0 and shutdown == true
         */
        @GuardedBy("lock")
    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-tests/test/com/google/common/util/concurrent/AbstractIdleServiceTest.java

      public void testStop_failed() {
        final Exception exception = new Exception("deliberate");
        TestService service =
            new TestService() {
              @Override
              protected void shutDown() throws Exception {
                super.shutDown();
                throw exception;
              }
            };
        service.startAsync().awaitRunning();
        assertEquals(1, service.startUpCalled);
        assertEquals(0, service.shutDownCalled);
    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. android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

     * the "running" state need to perform a periodic task. Subclasses can implement {@link #startUp},
     * {@link #shutDown} and also a {@link #runOneIteration} method that will be executed periodically.
     *
     * <p>This class uses the {@link ScheduledExecutorService} returned from {@link #executor} to run
     * the {@link #startUp} and {@link #shutDown} methods and also uses that service to schedule the
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 25.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

          enterRun.countDown();
          try {
            exitRun.await();
          } catch (InterruptedException e) {
            throw new RuntimeException(e);
          }
        }
    
        @Override
        protected void shutDown() {
          assertTrue(startUpCalled);
          assertTrue(runCalled);
          assertFalse(shutDownCalled);
          shutDownCalled = true;
          assertEquals(expectedShutdownState, state());
        }
    
        @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-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        application.addDelayedShutdownHook(service, 2, TimeUnit.SECONDS);
        verify(service, Mockito.never()).shutdown();
        application.shutdown();
        InOrder shutdownFirst = Mockito.inOrder(service);
        shutdownFirst.verify(service).shutdown();
        shutdownFirst.verify(service).awaitTermination(2, TimeUnit.SECONDS);
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (3)
  8. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

                  }
                }
              });
          this.shutdown = shutdown;
          start();
        }
    
        void shutdown() {
          shutdown.set(true);
          while (this.isAlive()) {
            Thread.yield();
          }
        }
      }
    
      void assertWrapsInterruptedException(RuntimeException e) {
        assertThat(e).hasMessageThat().contains("Unexpected interrupt");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  9. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

                  }
                }
              });
          this.shutdown = shutdown;
          start();
        }
    
        void shutdown() {
          shutdown.set(true);
          while (this.isAlive()) {
            Thread.yield();
          }
        }
      }
    
      void assertWrapsInterruptedException(RuntimeException e) {
        assertThat(e).hasMessageThat().contains("Unexpected interrupt");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

                listenerLatch.countDown();
              }
            },
            directExecutor());
      }
    
      @Override
      protected void tearDown() throws Exception {
        if (exec != null) {
          exec.shutdown();
        }
    
        super.tearDown();
      }
    
      public void testListenerDoesNotRunUntilTaskCompletes() throws Exception {
    
        // Test default state of not started.
        assertEquals(1, listenerLatch.getCount());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
Back to top