Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 238 for removeAt (0.19 sec)

  1. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt

            override fun runOnce(): Long {
              log += "run@${taskFaker.nanoTime}"
              if (schedules.isNotEmpty()) {
                redQueue.schedule(this, schedules.removeAt(0))
              }
              return delays.removeAt(0)
            }
          }
        redQueue.schedule(task, 100.µs)
    
        taskFaker.advanceUntil(0.µs)
        assertThat(log).isEmpty()
    
        taskFaker.advanceUntil(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)
  2. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

          } else {
            readyQueues.remove(taskQueue)
          }
        }
    
        if (coordinatorWaiting) {
          backend.coordinatorNotify(this@TaskRunner)
        } else {
          startAnotherThread()
        }
      }
    
      private fun beforeRun(task: Task) {
        lock.assertHeld()
    
        task.nextExecuteNanoTime = -1L
        val queue = task.queue!!
        queue.futureTasks.remove(task)
        readyQueues.remove(queue)
    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)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

          },
        )
      }
    
      /**
       * Holding the lock of the connection being added or removed when mutating this, and check its
       * [RealConnection.noNewExchanges] property. This defends against races where a connection is
       * simultaneously adopted and removed.
       */
      private val connections = ConcurrentLinkedQueue<RealConnection>()
    
      init {
    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)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

      private fun startNextTask(): SerialTask? {
        taskRunner.assertThreadHoldsLock()
    
        val index = serialTaskQueue.indexOfFirst { it.isReady() }
        if (index == -1) return null
    
        val nextTask = serialTaskQueue.removeAt(index)
        currentTask = nextTask
        contextSwitchCount++
        nextTask.start()
        return nextTask
      }
    
      private interface SerialTask {
        /** Returns true if this task is ready to start. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

        val calls = connection.calls
        val index = calls.indexOfFirst { it.get() == this@RealCall }
        check(index != -1)
    
        calls.removeAt(index)
        this.connection = null
    
        if (calls.isEmpty()) {
          connection.idleAtNs = System.nanoTime()
          if (connectionPool.connectionBecameIdle(connection)) {
            return connection.socket()
          }
        }
    
        return null
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  6. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        val events = mutableListOf<Any>()
    
        @Synchronized fun takeEvent(): Any {
          while (events.isEmpty()) {
            wait()
          }
          return events.removeAt(0)
        }
    
        @Synchronized override fun onRequest(
          streamId: Int,
          requestHeaders: List<Header>,
        ): Boolean {
          assertThat(streamId).isEqualTo(2)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Iterables.java

       * removeFrom.removeIf(predicate)} instead.
       *
       * @param removeFrom the iterable to (potentially) remove elements from
       * @param predicate a predicate that determines whether an element should be removed
       * @return {@code true} if any elements were removed from the iterable
       * @throws UnsupportedOperationException if the iterable does not support {@code remove()}.
       * @since 2.0
       */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 42.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/Iterators.java

          }
    
          @Override
          public void remove() {
            iterator.remove();
          }
        };
      }
    
      /**
       * Returns an iterator that cycles indefinitely over the provided elements.
       *
       * <p>The returned iterator supports {@code remove()}. After {@code remove()} is called,
       * subsequent cycles omit the removed element, but {@code elements} does not change. The
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 51.1K bytes
    - Viewed (0)
  9. cmd/tier-sweeper.go

    		return jentry{}, false
    	}
    
    	// 1. If bucket versioning is disabled, remove the remote object.
    	// 2. If bucket versioning is suspended and
    	//    a. version id is specified, remove its remote object.
    	//    b. version id is not specified, remove null version's remote object if it exists.
    	// 3. If bucket versioning is enabled and
    	//    a. version id is specified, remove its remote object.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  10. build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/rules/UpgradePropertiesRulePostProcess.java

                throw new RuntimeException("The following accessors were upgraded, but didn't match any removed/changed method:\n\n" + formattedLeft);
            }
    
            // Find accessors that were removed but shouldn't be
            Map<AccessorKey, ReplacedAccessor> removedAccessors = new HashMap<>(oldAccessorsOfUpgradedProperties);
            removedAccessors.entrySet().removeIf(e -> {
                if (!seenUpgradedAccessorsChanges.contains(e.getKey())) {
    Java
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Tue Apr 23 08:40:36 GMT 2024
    - 3.4K bytes
    - Viewed (0)
Back to top