Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for assertLockNotHeld (0.06 sec)

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

       * be removed from the execution schedule.
       */
      fun cancelAll() {
        taskRunner.assertLockNotHeld()
    
        taskRunner.withLock {
          if (cancelAllAndDecide()) {
            taskRunner.kickCoordinator(this)
          }
        }
      }
    
      fun shutdown() {
        taskRunner.assertLockNotHeld()
    
        taskRunner.withLock {
          shutdown = true
          if (cancelAllAndDecide()) {
    Registered: Fri Dec 26 11:42:13 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

      val ms = nanos / 1_000_000L
      val ns = nanos - (ms * 1_000_000L)
      if (ms > 0L || nanos > 0) {
        (this as Object).wait(ms, ns.toInt())
      }
    }
    
    internal inline fun Lockable.assertLockNotHeld() {
      if (assertionsEnabled && Thread.holdsLock(this)) {
        throw AssertionError("Thread ${Thread.currentThread().name} MUST NOT hold lock on $this")
      }
    }
    
    internal inline fun Lockable.assertLockHeld() {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 2.1K bytes
    - Viewed (0)
Back to top