Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for newSingleThreadExecutor (0.23 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

      }
    
      private class FakeService extends AbstractExecutionThreadService implements TearDown {
    
        private final ExecutorService executor = Executors.newSingleThreadExecutor();
    
        FakeService() {
          tearDownStack.addTearDown(this);
        }
    
        volatile int startupCalled = 0;
        volatile int shutdownCalled = 0;
        volatile int runCalled = 0;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

      }
    
      private class FakeService extends AbstractExecutionThreadService implements TearDown {
    
        private final ExecutorService executor = Executors.newSingleThreadExecutor();
    
        FakeService() {
          tearDownStack.addTearDown(this);
        }
    
        volatile int startupCalled = 0;
        volatile int shutdownCalled = 0;
        volatile int runCalled = 0;
    
    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)
  3. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        class MyError extends Error {}
        final CyclicBarrier barrier = new CyclicBarrier(2);
        // we need to make sure the error gets thrown on a different thread.
        ExecutorService service = Executors.newSingleThreadExecutor();
        try {
          final SequentialExecutor executor = new SequentialExecutor(service);
          Runnable errorTask =
              new Runnable() {
                @Override
                public void run() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        class MyError extends Error {}
        final CyclicBarrier barrier = new CyclicBarrier(2);
        // we need to make sure the error gets thrown on a different thread.
        ExecutorService service = Executors.newSingleThreadExecutor();
        try {
          final SequentialExecutor executor = new SequentialExecutor(service);
          Runnable errorTask =
              new Runnable() {
                @Override
                public void 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)
  5. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

      private static final long HALF_SECOND_NANOS = NANOSECONDS.convert(1L, SECONDS) / 2;
    
      public void testShutdownAndAwaitTermination_immediateShutdown() throws Exception {
        ExecutorService service = Executors.newSingleThreadExecutor();
        assertTrue(shutdownAndAwaitTermination(service, 1L, SECONDS));
        assertTrue(service.isTerminated());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

      private static final long HALF_SECOND_NANOS = NANOSECONDS.convert(1L, SECONDS) / 2;
    
      public void testShutdownAndAwaitTermination_immediateShutdown() throws Exception {
        ExecutorService service = Executors.newSingleThreadExecutor();
        assertTrue(shutdownAndAwaitTermination(service, 1L, SECONDS));
        assertTrue(service.isTerminated());
      }
    
    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)
  7. guava-tests/test/com/google/common/io/MoreFilesTest.java

            Path dirToDelete = fs.getPath("dir/b/i");
            Path changingFile = dirToDelete.resolve("j/l");
            Path symlinkTarget = fs.getPath("/dontdelete");
    
            ExecutorService executor = Executors.newSingleThreadExecutor();
            startDirectorySymlinkSwitching(changingFile, symlinkTarget, executor);
    
            try {
              for (int i = 0; i < iterations; i++) {
                try {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Jan 29 22:57:05 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

       * despite not throwing a RejectedExecutionException synchronously with the call to {@code
       * execute}. If this behaviour is problematic, use an Executor with a single thread (e.g. {@link
       * Executors#newSingleThreadExecutor}).
       *
       * @since 23.3 (since 23.1 as {@code sequentialExecutor})
       */
      @J2ktIncompatible
      @GwtIncompatible
      public static Executor newSequentialExecutor(Executor delegate) {
    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)
Back to top