Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for withLock (0.03 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

       */
      fun cancelAll() {
        taskRunner.assertLockNotHeld()
    
        taskRunner.withLock {
          if (cancelAllAndDecide()) {
            taskRunner.kickCoordinator(this)
          }
        }
      }
    
      fun shutdown() {
        taskRunner.assertLockNotHeld()
    
        taskRunner.withLock {
          shutdown = true
          if (cancelAllAndDecide()) {
            taskRunner.kickCoordinator(this)
          }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/Lockable.kt

      if (assertionsEnabled && !Thread.holdsLock(this)) {
        throw AssertionError("Thread ${Thread.currentThread().name} MUST hold lock on $this")
      }
    }
    
    @OptIn(ExperimentalContracts::class)
    inline fun <T> Lockable.withLock(action: () -> T): T {
      contract { callsInPlace(action, InvocationKind.EXACTLY_ONCE) }
      return synchronized(this, action)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

    import javax.net.ssl.SSLSocketFactory
    import okhttp3.internal.RecordingOkAuthenticator
    import okhttp3.internal.concurrent.TaskFaker
    import okhttp3.internal.concurrent.TaskRunner
    import okhttp3.internal.concurrent.withLock
    import okhttp3.internal.connection.CallConnectionUser
    import okhttp3.internal.connection.ConnectionListener
    import okhttp3.internal.connection.FastFallbackExchangeFinder
    import okhttp3.internal.connection.RealCall
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri May 30 21:28:20 UTC 2025
    - 7.7K bytes
    - Viewed (0)
Back to top