Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for holdsLock (0.15 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

          takeEvent()
        }
      }
    
      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)
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

        throw AssertionError("Thread ${Thread.currentThread().name} MUST hold lock on $this")
      }
    }
    
    @Suppress("NOTHING_TO_INLINE")
    internal inline fun Any.assertThreadHoldsLock() {
      if (assertionsEnabled && !Thread.holdsLock(this)) {
        throw AssertionError("Thread ${Thread.currentThread().name} MUST hold lock on $this")
      }
    }
    
    @Suppress("NOTHING_TO_INLINE")
    internal inline fun ReentrantLock.assertNotHeld() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt

      fun clearAllEvents() {
        while (eventSequence.isNotEmpty()) {
          takeEvent()
        }
      }
    
      private fun logEvent(e: CallEvent) {
        for (lock in forbiddenLocks) {
          assertThat(Thread.holdsLock(lock), lock.toString()).isFalse()
        }
    
        if (enforceOrder) {
          checkForStartEvent(e)
        }
    
        eventSequence.offer(e)
      }
    
      private fun checkForStartEvent(e: CallEvent) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9K bytes
    - Viewed (1)
Back to top