- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for So (0.11 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
import java.util.concurrent.TimeUnit import java.util.logging.Logger import kotlin.concurrent.withLock import okhttp3.OkHttpClient import okhttp3.TestUtil.threadFactory /** * Runs a [TaskRunner] in a controlled environment so that everything is sequential and * deterministic. * * This class ensures that at most one thread is running at a time. This is initially the JUnit test
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/concurrent/TaskRunnerTest.kt
taskFaker.sleep(100.µs) log += "blue:finishing@${taskFaker.nanoTime}" } assertThat(taskFaker.executeCallCount).isEqualTo(1) // Running the red task starts another thread, so the two can run in parallel. taskFaker.runNextTask() assertThat(log).containsExactly("red:starting@0") assertThat(taskFaker.executeCallCount).isEqualTo(2) // Next the blue task starts.
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)