- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for name (0.12 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt
val currentThread = Thread.currentThread() val oldName = currentThread.name currentThread.name = task.name var delayNanos = -1L try { delayNanos = task.runOnce() } finally { lock.withLock { afterRun(task, delayNanos) } currentThread.name = oldName } } private fun afterRun( task: Task, delayNanos: Long,
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) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
throw AssertionError("Thread ${Thread.currentThread().name} MUST hold lock on $this") } } @Suppress("NOTHING_TO_INLINE") internal inline fun Any.assertThreadDoesntHoldLock() { if (assertionsEnabled && taskRunner.lock.isHeldByCurrentThread) { throw AssertionError("Thread ${Thread.currentThread().name} MUST NOT hold lock on $this") } }
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) -
okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt
Thread.sleep(100) val threads = arrayOfNulls<Thread>(Thread.activeCount() * 2) Thread.enumerate(threads) for (t in threads) { if (t != null && t.name == "OkHttp TaskRunner") { t.interrupt() } } Thread.sleep(100) assertThat(realTaskRunner.activeQueues()).isEmpty() } @Test fun connectionPreWarmingHttp1() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 24 04:40:49 GMT 2024 - 12.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt
"FINE: Q10001 finished run in 0 µs: task two", ) } @Test fun taskNameIsUsedForThreadNameWhenRunning() { redQueue.execute("lucky task") { log += "run threadName:${Thread.currentThread().name}" } taskFaker.advanceUntil(0.µs) assertThat(log).containsExactly("run threadName:lucky task") taskFaker.assertNoMoreTasks() assertThat(testLogHandler.takeAll()).containsExactly(
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)