Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for NewQueue (0.18 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 May 03 11:42:14 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 23K 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 May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  4. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  5. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 34K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

        lock.assertHeld()
        if (executeCallCount > runCallCount) return // A thread is still starting.
    
        executeCallCount++
        backend.execute(this@TaskRunner, runnable)
      }
    
      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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  7. cni/pkg/repair/repaircontroller.go

    	c.pods = kclient.NewFiltered[*corev1.Pod](client, kclient.Filter{
    		LabelSelector: cfg.LabelSelectors,
    		FieldSelector: strings.Join(fieldSelectors, ","),
    	})
    	c.queue = controllers.NewQueue("repair pods",
    		controllers.WithReconciler(c.Reconcile),
    		controllers.WithMaxAttempts(5))
    	c.pods.AddEventHandler(controllers.ObjectHandler(c.queue.AddObject))
    
    	return c, nil
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  8. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

        // Reuse if the user specified a port
        serverSocket!!.reuseAddress = inetSocketAddress.port != 0
        serverSocket!!.bind(inetSocketAddress, 50)
    
        portField = serverSocket!!.localPort
    
        taskRunner.newQueue().execute("MockWebServer $portField", cancelable = false) {
          try {
            logger.fine("$this starting to accept connections")
            acceptConnections()
          } catch (e: Throwable) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

      private var writer: WebSocketWriter? = null
    
      /** Used for writes, pings, and close timeouts. */
      private var taskQueue = taskRunner.newQueue()
    
      /** Names this web socket for observability and debugging. */
      private var name: String? = null
    
      /** The streams held by this web socket. This is closed when both reader and writer are closed. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

       * time an edit is committed. A snapshot is stale if its sequence number is not equal to its
       * entry's sequence number.
       */
      private var nextSequenceNumber: Long = 0
    
      private val cleanupQueue = taskRunner.newQueue()
      private val cleanupTask =
        object : Task("$okHttpName Cache") {
          override fun runOnce(): Long {
            synchronized(this@DiskLruCache) {
              if (!initialized || closed) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
Back to top