- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for if (0.16 sec)
-
okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt
object : Task("task") { val schedules = mutableListOf(50.µs) val delays = mutableListOf(200.µs, -1) override fun runOnce(): Long { log += "run@${taskFaker.nanoTime}" if (schedules.isNotEmpty()) { redQueue.schedule(this, schedules.removeAt(0)) } return delays.removeAt(0) } } redQueue.schedule(task, 100.µs)
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) -
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt
* until one is ready. If there are no ready queues, or if other threads have everything under * control this will return null. If there is more than a single task ready to execute immediately * this will start another thread to handle that work. */ fun awaitTaskToRun(): Task? { lock.assertHeld() while (true) { if (readyQueues.isEmpty()) { return null // Nothing to do.
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
@Suppress("NOTHING_TO_INLINE") internal inline fun Any.assertThreadHoldsLock() { if (assertionsEnabled && !taskRunner.lock.isHeldByCurrentThread) { 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) {
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)