Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for Lock (0.18 sec)

  1. kotlin-js-store/yarn.lock

    Yuri Schimke <******@****.***> 1690028931 +0100
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jul 22 12:28:51 GMT 2023
    - 87.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/Locks.kt

        return lock.withLock(action)
      }
    
      inline fun <T> RealConnection.withLock(action: () -> T): T {
        contract { callsInPlace(action, InvocationKind.EXACTLY_ONCE) }
        return lock.withLock(action)
      }
    
      inline fun <T> RealCall.withLock(action: () -> T): T {
        contract { callsInPlace(action, InvocationKind.EXACTLY_ONCE) }
        return lock.withLock(action)
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

      outFinished: Boolean,
      inFinished: Boolean,
      headers: Headers?,
    ) {
      internal val lock: ReentrantLock = ReentrantLock()
      val condition: Condition = lock.newCondition()
    
      // Internal state is guarded by [lock]. No long-running or potentially blocking operations are
      // performed while the lock is held.
    
      /** The bytes consumed and acknowledged by the stream. */
      val readBytes: WindowCounter = WindowCounter(id)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

        queue.schedule(
          object : Task("$okHttpName ConnectionPool connection opener") {
            override fun runOnce(): Long = openConnections(this@scheduleOpener)
          },
        )
      }
    
      /**
       * 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.
       */
    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)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

      }
    
      private fun logEvent(e: ConnectionEvent) {
        if (e.connection != null) {
          assertThat(Thread.holdsLock(e.connection), "Called with lock $${e.connection}")
            .isFalse()
        }
        for (lock in forbiddenLocks) {
          assertThat(Thread.holdsLock(lock), "Called with lock $lock")
            .isFalse()
        }
    
        if (enforceOrder) {
          checkForStartEvent(e)
        }
    
        eventSequence.offer(e)
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

    ) : Http2Connection.Listener(), Connection, ExchangeCodec.Carrier {
      private var http2Connection: Http2Connection? = null
    
      internal val lock: ReentrantLock = ReentrantLock()
    
      // These properties are guarded by [lock].
    
      /**
       * If true, no new exchanges can be created on this connection. It is necessary to set this to
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

       * additional context. Otherwise [e] is returned as-is.
       */
      private fun <E : IOException?> callDone(e: E): E {
        lock.assertNotHeld()
    
        val connection = this.connection
        if (connection != null) {
          connection.lock.assertNotHeld()
          val toClose: Socket? =
            connection.withLock {
              // Sets this.connection to null.
              releaseConnectionNoEvents()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  8. docs/contribute/concurrency.md

    ### Locks
    
    We have 3 different things that we synchronize on.
    
    #### Http2Connection
    
    This lock guards internal state of each connection. This lock is never held for blocking operations. That means that we acquire the lock, read or write a few fields and release the lock. No I/O and no application-layer callbacks.
    
    #### Http2Stream
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 7K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

       * be removed from the execution schedule.
       */
      fun cancelAll() {
        lock.assertNotHeld()
    
        taskRunner.lock.withLock {
          if (cancelAllAndDecide()) {
            taskRunner.kickCoordinator(this)
          }
        }
      }
    
      fun shutdown() {
        lock.assertNotHeld()
    
        taskRunner.lock.withLock {
          shutdown = true
          if (cancelAllAndDecide()) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt

      /** The timestamp of the last taken event, used to measure elapsed time between events. */
      private var lastTimestampNs: Long? = null
    
      /** Confirm that the thread does not hold a lock on `lock` during the callback. */
      fun forbidLock(lock: Any) {
        forbiddenLocks.add(lock)
      }
    
      /**
       * Removes recorded events up to (and including) an event is found whose class equals [eventClass]
       * and returns it.
       */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9K bytes
    - Viewed (1)
Back to top