Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for runNextTask (0.05 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

     * deterministic.
     *
     * This class ensures that at most one thread is running at a time. This is initially the JUnit test
     * thread, which yields its execution privilege while calling [runTasks], [runNextTask], or
     * [advanceUntil]. These functions don't return until the task threads are all idle.
     *
     * Task threads release their execution privilege in these ways:
     *
     *  * By yielding in [TaskRunner.Backend.coordinatorWait].
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/concurrent/TaskRunnerTest.kt

        // 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.
        taskFaker.runNextTask()
        assertThat(log).containsExactly(
          "red:starting@0",
          "blue:starting@0",
        )
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 23K bytes
    - Viewed (0)
Back to top