Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for directExecutor (0.16 sec)

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

       * Inappropriate {@code directExecutor} usage can cause problems, and these problems can be
       * difficult to reproduce because they depend on timing. For example:
       *
       * <ul>
       *   <li>When a {@code ListenableFuture} listener is registered to run under {@code
       *       directExecutor}, the listener can execute in any of three possible threads:
       *       <ol>
    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)
  2. android/guava/src/com/google/common/util/concurrent/Futures.java

       * ListenableFuture<Integer> faultTolerantFuture = Futures.catching(
       *     fetchCounterFuture, FetchException.class, x -> 0, directExecutor());
       * }</pre>
       *
       * <p>When selecting an executor, note that {@code directExecutor} is dangerous in some cases. See
       * the warnings the {@link MoreExecutors#directExecutor} documentation.
       *
       * @param input the primary input {@code Future}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 59.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

     *             executor)
     *         .transformAsync((closer, transaction) -> transaction.queryClosingFuture("..."), executor)
     *         .transform((closer, result) -> result.get("userName"), directExecutor())
     *         .catching(DBException.class, e -> "no user", directExecutor())
     *         .finishToFuture();
     * }</pre>
     *
     * In this example, when the {@code userName} {@link Future} is done, the transaction and the query
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 98.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/ExecutionList.java

     * <p>Exceptions thrown by a listener will be propagated up to the executor. Any exception thrown
     * during {@code Executor.execute} (e.g., a {@code RejectedExecutionException} or an exception
     * thrown by {@linkplain MoreExecutors#directExecutor direct execution}) will be caught and logged.
     *
     * @author Nishant Thakkar
     * @author Sven Mawson
     * @since 1.0
     */
    @J2ktIncompatible
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

          if (ATOMIC_HELPER.casValue(this, null, valueToSet)) {
            // the listener is responsible for calling completeWithFuture, directExecutor is appropriate
            // since all we are doing is unpacking a completed future which should be fast.
            try {
              future.addListener(valueToSet, DirectExecutor.INSTANCE);
            } catch (Throwable t) {
              // Any Exception is either a RuntimeException or sneaky checked exception.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K bytes
    - Viewed (0)
Back to top