Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ValueAndCloser (0.12 sec)

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

        assertThatFutureFailsWithException(closingFuture.statusFuture());
        ValueAndCloser<?> valueAndCloser = finishToValueAndCloser(closingFuture);
        try {
          valueAndCloser.get();
          fail();
        } catch (ExecutionException expected) {
          assertThat(expected).hasCauseThat().isSameInstanceAs(exception);
        }
        valueAndCloser.closeAsync();
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToValueAndCloserTest.java

        assertThatFutureFailsWithException(closingFuture.statusFuture());
        ValueAndCloser<?> valueAndCloser = finishToValueAndCloser(closingFuture);
        try {
          valueAndCloser.get();
          fail();
        } catch (ExecutionException expected) {
          assertThat(expected).hasCauseThat().isSameInstanceAs(exception);
        }
        valueAndCloser.closeAsync();
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

     *     .transform((closer, result) -> result.get("userName"), directExecutor())
     *     .catching(DBException.class, e -> "no user", directExecutor())
     *     .finishToValueAndCloser(
     *         valueAndCloser -> this.userNameValueAndCloser = valueAndCloser, executor);
     *
     * // later
     * try { // get() will throw if the operation failed or was cancelled.
     *   UserName userName = userNameValueAndCloser.get();
     *   // do something with userName
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 08 19:36:35 UTC 2024
    - 98.5K bytes
    - Viewed (0)
Back to top