Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 322 for Futures (0.5 sec)

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

        /**
         * Contains the most recently submitted {@code Future}, which may be cancelled or updated,
         * always under a lock.
         */
        private static final class SupplantableFuture implements Cancellable {
          private final ReentrantLock lock;
    
          @GuardedBy("lock")
          private Future<@Nullable Void> currentFuture;
    
          SupplantableFuture(ReentrantLock lock, Future<@Nullable Void> currentFuture) {
            this.lock = lock;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Dec 13 19:45:20 UTC 2023
    - 25.8K bytes
    - Viewed (0)
  2. maven-core/src/test/resources/projects/future-model-version-pom.xml

    specific language governing permissions and limitations
    under the License.
    -->
    
    <project>
        <modelVersion>4.9.1</modelVersion>
        <groupId>tests.project</groupId>
        <artifactId>future-model-version</artifactId>
        <version>1</version>
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Mon Sep 11 16:17:26 UTC 2023
    - 939 bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

         * The method is invoked automatically by a successful call to {@link #cancel(boolean)
         * cancel(true)}.
         *
         * <p>The default implementation does nothing.
         *
         * @since 10.0
         */
        protected void interruptTask() {}
    
        /**
         * Returns true if this future was cancelled with {@code mayInterruptIfRunning} set to {@code
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Apr 06 12:56:11 UTC 2023
    - 13.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

        SettableFuture<Integer> future = SettableFuture.create();
        assertTrue(future.set(42));
        // Later attempts to set the future should return false.
        assertFalse(future.set(23));
        assertFalse(future.setException(new Exception("bar")));
        assertFalse(future.setFuture(SettableFuture.<Integer>create()));
        // Check that the future has been set properly.
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

        assertFalse(future.isCancelled());
    
        ExecutorService executor = Executors.newSingleThreadExecutor();
    
        try {
          Future<Boolean> getResult = executor.submit(() -> future.get());
    
          // Release the future value.
          latch.countDown();
    
          assertTrue(getResult.get(10, SECONDS));
        } finally {
          executor.shutdownNow();
        }
    
        assertTrue(future.isDone());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 18:30:30 UTC 2023
    - 6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

      }
    
      public void testCancel_notDoneNoInterrupt() throws Exception {
        Future<?> future = newFutureInstance();
        assertTrue(future.cancel(false));
        assertTrue(future.isCancelled());
        assertTrue(future.isDone());
        assertNull(tryInternalFastPathGetFailure(future));
        CancellationException e = assertThrows(CancellationException.class, () -> future.get());
        assertNotNull(e.getCause());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

      }
    
      public void testCancel_notDoneNoInterrupt() throws Exception {
        Future<?> future = newFutureInstance();
        assertTrue(future.cancel(false));
        assertTrue(future.isCancelled());
        assertTrue(future.isDone());
        assertNull(tryInternalFastPathGetFailure(future));
        CancellationException e = assertThrows(CancellationException.class, () -> future.get());
        assertNotNull(e.getCause());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/TestPlatform.java

      }
    
      /**
       * Retrieves the result of a {@code Future} known to be done but uses the {@code get(long,
       * TimeUnit)} overload in order to test that method.
       */
      static <V> V getDoneFromTimeoutOverload(Future<V> future) throws ExecutionException {
        checkState(future.isDone(), "Future was expected to be done: %s", future);
        try {
          return getUninterruptibly(future, 0, SECONDS);
        } catch (TimeoutException e) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  9. android/guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java

                return taskDone;
              }
            };
        List<Future<Boolean>> futureList =
            executor.invokeAll(ImmutableList.of(task), 10, TimeUnit.MILLISECONDS);
        Future<Boolean> future = futureList.get(0);
        assertFalse(taskDone);
        assertTrue(future.isDone());
        assertThrows(CancellationException.class, () -> future.get());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  10. guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java

                return taskDone;
              }
            };
        List<Future<Boolean>> futureList =
            executor.invokeAll(ImmutableList.of(task), 10, TimeUnit.MILLISECONDS);
        Future<Boolean> future = futureList.get(0);
        assertFalse(taskDone);
        assertTrue(future.isDone());
        assertThrows(CancellationException.class, () -> future.get());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 3.7K bytes
    - Viewed (0)
Back to top