Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for canceler (0.04 sec)

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

       * input future and that of the future returned by the chain function. That is, if the returned
       * {@code Future} is cancelled, it will attempt to cancel the other two, and if either of the
       * other two is cancelled, the returned {@code Future} will receive a callback in which it will
       * attempt to cancel itself.
       *
       * @param input The future to transform
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 64.3K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealCall.kt

       */
      override fun cancel() {
        if (canceled) return // Already canceled.
    
        canceled = true
        exchange?.cancel()
        for (plan in plansToCancel) {
          plan.cancel()
        }
    
        eventListener.canceled(this)
      }
    
      override fun isCanceled(): Boolean = canceled
    
      override fun execute(): Response {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 17.8K bytes
    - Viewed (0)
  3. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

            }
          } catch (e: Exception) {
            val exception =
              when {
                canceled -> IOException("canceled", e)
                else -> e
              }
            listener.onFailure(this, exception, response)
            return
          }
          if (canceled) {
            listener.onFailure(this, IOException("canceled"), response)
          } else {
            listener.onClosed(this)
          }
        }
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  4. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSource.kt

       * the event source has already been closed or canceled.
       */
      fun cancel()
    
      fun interface Factory {
        /**
         * Creates a new event source and immediately returns it. Creating an event source initiates an
         * asynchronous process to connect the socket. Once that succeeds or fails, `listener` will be
         * notified. The caller must cancel the returned event source when it is no longer in use.
         */
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  5. guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

          @Override
          @SuppressWarnings("Interruption") // We are propagating an interrupt from a caller.
          public void cancel(boolean mayInterruptIfRunning) {
            /*
             * Lock to ensure that a task cannot be rescheduled while a cancel is ongoing.
             *
             * In theory, cancel() could execute arbitrary listeners -- bad to do while holding a lock.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 27.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        // stop it.
        blockingCallable.waitForStart();
    
        // This time, cancel the future for the first task. The task remains running, only the future
        // is cancelled.
        future1.cancel(false);
    
        // Give the second task a chance to (incorrectly) start up while the first task is running.
        // (This is the assertion that fails.)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 20:58:01 UTC 2025
    - 16.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

       * input future and that of the future returned by the chain function. That is, if the returned
       * {@code Future} is cancelled, it will attempt to cancel the other two, and if either of the
       * other two is cancelled, the returned {@code Future} will receive a callback in which it will
       * attempt to cancel itself.
       *
       * <p>This method is similar to {@link java.util.concurrent.CompletableFuture#thenCompose} and
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

          @Override
          @SuppressWarnings("Interruption") // We are propagating an interrupt from a caller.
          public void cancel(boolean mayInterruptIfRunning) {
            /*
             * Lock to ensure that a task cannot be rescheduled while a cancel is ongoing.
             *
             * In theory, cancel() could execute arbitrary listeners -- bad to do while holding a lock.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 27.7K bytes
    - Viewed (0)
  9. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourcesHttpTest.kt

            .build(),
        )
        listener.enqueueCancel() // Will cancel in onOpen().
        val request = Request.Builder().url(server.url("/")).build()
        val response = client.newCall(request).execute()
        response.processEventSource(listener)
        listener.assertOpen()
        listener.assertFailure("canceled")
      }
    
      @Test
      fun failureWith401IsReadable() {
        server.enqueue(
          MockResponse(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 13:49:38 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  10. docs/recipes.md

            val startNanos = System.nanoTime()
            val call = client.newCall(request)
    
            // Schedule a job to cancel the call in 1 second.
            executor.schedule({
              System.out.printf("%.2f Canceling call.%n", (System.nanoTime() - startNanos) / 1e9f)
              call.cancel()
              System.out.printf("%.2f Canceled call.%n", (System.nanoTime() - startNanos) / 1e9f)
            }, 1, TimeUnit.SECONDS)
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 47.8K bytes
    - Viewed (0)
Back to top