Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for NewQueue (0.3 sec)

  1. okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt

        taskFaker.close()
        routePlanner.close()
      }
    
      @Test
      fun takeConnectedConnection() {
        val plan0 = routePlanner.addPlan()
        plan0.connectState = TLS_CONNECTED
    
        taskRunner.newQueue().execute("connect") {
          val result0 = finder.find()
          assertThat(result0).isEqualTo(plan0.connection)
        }
    
        taskFaker.runTasks()
        assertEvents(
          "take plan 0",
        )
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt

      private val taskRunner = taskFaker.taskRunner
      private val log = mutableListOf<String>()
      private val redQueue = taskRunner.newQueue()
      private val blueQueue = taskRunner.newQueue()
      private val greenQueue = taskRunner.newQueue()
    
      @AfterEach
      internal fun tearDown() {
        taskFaker.close()
      }
    
      @Test fun executeDelayed() {
        redQueue.execute("task", 100.µs) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 20K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

      /** Asynchronously writes frames to the outgoing socket. */
      private val writerQueue = taskRunner.newQueue()
    
      /** Ensures push promise callbacks events are sent in order per stream. */
      private val pushQueue = taskRunner.newQueue()
    
      /** Notifies the listener of settings changes. */
      private val settingsListenerQueue = taskRunner.newQueue()
    
      /** User code to run in response to push promise events. */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt

          }
        }
    
      private val backend = TaskRunner.RealBackend(threadFactory)
      private val taskRunner = TaskRunner(backend)
      private val queue = taskRunner.newQueue()
    
      @AfterEach fun tearDown() {
        backend.shutdown()
      }
    
      @Test fun test() {
        val t1 = System.nanoTime() / 1e6
    
        val delays = mutableListOf(TimeUnit.MILLISECONDS.toNanos(1000), -1L)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

        if (plan is FailedPlan) return plan.result
    
        // Connect TCP asynchronously.
        tcpConnectsInFlight += plan
        val taskName = "$okHttpName connect ${routePlanner.address.url.redact()}"
        taskRunner.newQueue().schedule(
          object : Task(taskName) {
            override fun runOnce(): Long {
              val connectResult =
                try {
                  plan.connectTcp()
                } catch (e: Throwable) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

    ) {
      internal val keepAliveDurationNs: Long = timeUnit.toNanos(keepAliveDuration)
    
      @Volatile
      private var addressStates: Map<Address, AddressState> = mapOf()
    
      private val cleanupQueue: TaskQueue = taskRunner.newQueue()
      private val cleanupTask =
        object : Task("$okHttpName ConnectionPool connection closer") {
          override fun runOnce(): Long = closeConnections(System.nanoTime())
        }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  7. architecture/networking/controllers.md

    With a few exceptions, Istio controllers typically are split in two phases: construction and running.
    
    Construction should create informers (via `kclient.New`), setup a queue (via `controllers.NewQueue`), and register event handlers on the informers.
    Often, these handlers are adding something to the queue like `client.AddEventHandler(controllers.ObjectHandler(queue.AddObject))`.
    Plain Text
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Feb 09 17:41:25 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java

      }
    
      private void growIfNeeded() {
        if (size > queue.length) {
          int newCapacity = calculateNewCapacity();
          Object[] newQueue = new Object[newCapacity];
          System.arraycopy(queue, 0, newQueue, 0, queue.length);
          queue = newQueue;
        }
      }
    
      /** Returns ~2x the old capacity if small; ~1.5x otherwise. */
      private int calculateNewCapacity() {
        int oldCapacity = queue.length;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 34K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

                cancelAll()
              } finally {
                coordinatorWaiting = false
              }
            }
          }
        }
      }
    
      fun newQueue(): TaskQueue {
        val name = lock.withLock { nextQueueName++ }
        return TaskQueue(this, "Q$name")
      }
    
      /**
       * Returns a snapshot of queues that currently have tasks scheduled. The task runner does not
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  10. cni/pkg/nodeagent/informers.go

    	s := &InformerHandlers{ctx: ctx, dataplane: dataplane, systemNamespace: systemNamespace}
    	s.queue = controllers.NewQueue("ambient",
    		controllers.WithGenericReconciler(s.reconcile),
    		controllers.WithMaxAttempts(5),
    	)
    	// We only need to handle pods on our node
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Feb 08 01:03:24 GMT 2024
    - 9.9K bytes
    - Viewed (0)
Back to top