- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for runOnce (0.06 sec)
-
okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt
val task = 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) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 29 00:33:04 UTC 2024 - 23K bytes - Viewed (0) -
src/archive/zip/writer_test.go
// This effectively discards the very large initial flate setup cost, // as well as the initialization of bigBuf. runOnce(&bytes.Buffer{}) b.ResetTimer() b.RunParallel(func(pb *testing.PB) { var buf bytes.Buffer for pb.Next() { runOnce(&buf) } }) } func writeTestsToFS(tests []WriteTest) fs.FS { fsys := fstest.MapFS{} for _, wt := range tests {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 14.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt
private val cleanupTask = object : Task("$okHttpName ConnectionPool connection closer") { override fun runOnce(): Long = closeConnections(System.nanoTime()) } private fun AddressState.scheduleOpener() { queue.schedule( object : Task("$okHttpName ConnectionPool connection opener") { override fun runOnce(): Long = openConnections(this@scheduleOpener) }, ) } /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 16.2K bytes - Viewed (0) -
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,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 29 00:33:04 UTC 2024 - 10.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 22.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt
*/ private var nextSequenceNumber: Long = 0 private val cleanupQueue = taskRunner.newQueue() private val cleanupTask = object : Task("$okHttpName Cache") { override fun runOnce(): Long { synchronized(this@DiskLruCache) { if (!initialized || closed) { return -1L // Nothing to do. } try { trimToSize()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 34.7K bytes - Viewed (0)