Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 243 for avait (0.05 sec)

  1. src/main/java/org/codelibs/fess/helper/ProcessHelper.java

                    } finally {
                        latch.countDown();
                    }
                }, "ProcessCloser-output-" + sessionId).start();
    
                try {
                    latch.await(10, TimeUnit.SECONDS);
                } catch (final InterruptedException e) {
                    logger.warn("Interrupted to wait a process.", e);
                }
                try {
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Fri Oct 11 21:20:39 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/background-tasks.md

    **FastAPI** 会创建一个 `BackgroundTasks` 类型的对象并作为该参数传入。
    
    ## 创建一个任务函数
    
    创建要作为后台任务运行的函数。
    
    它只是一个可以接收参数的标准函数。
    
    它可以是 `async def` 或普通的 `def` 函数,**FastAPI** 知道如何正确处理。
    
    在这种情况下,任务函数将写入一个文件(模拟发送电子邮件)。
    
    由于写操作不使用 `async` 和 `await`,我们用普通的 `def` 定义函数:
    
    ```Python hl_lines="6-9"
    {!../../docs_src/background_tasks/tutorial001.py!}
    ```
    
    ## 添加后台任务
    
    在你的 *路径操作函数* 里,用 `.add_task()` 方法将任务函数传到 *后台任务* 对象中:
    
    ```Python hl_lines="14"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java

          Future<?> possiblyIgnoredError = executorService.submit(executeTask);
          returnValue += (int) listenerLatch.getCount();
          listenerLatch.await();
        }
        return returnValue;
      }
    
      @Benchmark
      int executeThenAdd_multiThreaded(final int reps) throws InterruptedException {
        Runnable addTask =
            new Runnable() {
              @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/background-tasks.md

    В нашем примере фоновая задача будет вести запись в файл (симулируя отправку письма).
    
    Так как операция записи не использует `async` и `await`, мы определим ее как обычную `def`:
    
    ```Python hl_lines="6-9"
    {!../../docs_src/background_tasks/tutorial001.py!}
    ```
    
    ## Добавление фоновой задачи
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/testing.md

    为你需要检查的地方用标准的Python表达式写个简单的 `assert` 语句(重申,标准的`pytest`)。
    
    ```Python hl_lines="2  12  15-18"
    {!../../docs_src/app_testing/tutorial001.py!}
    ```
    
    /// tip | "提示"
    
    注意测试函数是普通的 `def`,不是 `async def`。
    
    还有client的调用也是普通的调用,不是用 `await`。
    
    这让你可以直接使用 `pytest` 而不会遇到麻烦。
    
    ///
    
    /// note | "技术细节"
    
    你也可以用 `from starlette.testclient import TestClient`。
    
    **FastAPI** 提供了和 `starlette.testclient` 一样的 `fastapi.testclient`,只是为了方便开发者。但它直接来自Starlette。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6K bytes
    - Viewed (0)
  6. docs/em/docs/tutorial/testing.md

    ```Python hl_lines="2  12  15-18"
    {!../../docs_src/app_testing/tutorial001.py!}
    ```
    
    /// tip
    
    👀 👈 🔬 🔢 😐 `def`, 🚫 `async def`.
    
     &amp; 🤙 👩‍💻 😐 🤙, 🚫 ⚙️ `await`.
    
    👉 ✔ 👆 ⚙️ `pytest` 🔗 🍵 🤢.
    
    ///
    
    /// note | "📡 ℹ"
    
    👆 💪 ⚙️ `from starlette.testclient import TestClient`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/testing.md

    {!../../docs_src/app_testing/tutorial001.py!}
    ```
    
    /// tip
    
    Notice that the testing functions are normal `def`, not `async def`.
    
    And the calls to the client are also normal calls, not using `await`.
    
    This allows you to use `pytest` directly without complications.
    
    ///
    
    /// note | "Technical Details"
    
    You could also use `from starlette.testclient import TestClient`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/background-tasks.md

    In diesem Fall schreibt die Taskfunktion in eine Datei (den Versand einer E-Mail simulierend).
    
    Und da der Schreibvorgang nicht `async` und `await` verwendet, definieren wir die Funktion mit normalem `def`:
    
    ```Python hl_lines="6-9"
    {!../../docs_src/background_tasks/tutorial001.py!}
    ```
    
    ## Den Hintergrundtask hinzufügen
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  9. compat/maven-embedder/src/main/java/org/apache/maven/cli/transfer/SimplexTransferListener.java

                super.process(consumer);
                latch.countDown();
            }
    
            @Override
            public void waitForProcessed() throws InterruptedException {
                latch.await();
            }
        }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        peer.acceptFrame() // RST_STREAM
        peer.acceptFrame() // DEGRADED PING
        peer.acceptFrame() // AWAIT PING
        peer.sendFrame().ping(true, Http2Connection.DEGRADED_PING, 1) // DEGRADED PONG
        peer.sendFrame().ping(true, Http2Connection.AWAIT_PING, 0) // AWAIT PONG
        peer.play()
    
        // Play it back.
        val connection = connect(peer)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 75.4K bytes
    - Viewed (0)
Back to top