Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 31 - 40 of 51 for thread_pool (0.71 seconds)

  1. docs/en/docs/advanced/stream-data.md

    ///
    
    To avoid blocking the event loop, you can simply declare the *path operation function* with regular `def` instead of `async def`, that way FastAPI will run it on a threadpool worker, to avoid blocking the main loop.
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[30:34] hl[31] *}
    
    /// tip
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 5.4K bytes
    - Click Count (0)
  2. docs/de/docs/advanced/stream-data.md

    ///
    
    Um die Event-Loop nicht zu blockieren, können Sie die Pfadoperation-Funktion einfach mit normalem `def` statt `async def` deklarieren, dadurch führt FastAPI sie in einem Threadpool-Worker aus, um die Haupt-Event-Loop nicht zu blockieren.
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[30:34] hl[31] *}
    
    /// tip | Tipp
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:48:21 GMT 2026
    - 6K bytes
    - Click Count (0)
  3. docs/pt/docs/advanced/stream-data.md

    ///
    
    Para evitar bloquear o loop de eventos, você pode simplesmente declarar a função de operação de rota com `def` normal em vez de `async def`. Assim, o FastAPI a executará em um worker de threadpool, evitando bloquear o loop principal.
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[30:34] hl[31] *}
    
    /// tip | Dica
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:13 GMT 2026
    - 5.7K bytes
    - Click Count (0)
  4. docs/en/docs/tutorial/request-files.md

    ```Python
    contents = myfile.file.read()
    ```
    
    /// note | `async` Technical Details
    
    When you use the `async` methods, **FastAPI** runs the file methods in a threadpool and awaits for them.
    
    ///
    
    /// note | Starlette Technical Details
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 7K bytes
    - Click Count (0)
  5. docs/pt/docs/tutorial/request-files.md

    ```Python
    contents = myfile.file.read()
    ```
    
    /// note | Detalhes Técnicos do `async`
    
    Quando você usa os métodos `async`, o **FastAPI** executa os métodos de arquivo em um threadpool e aguarda por eles.
    
    ///
    
    /// note | Detalhes Técnicos do Starlette
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 7.8K bytes
    - Click Count (0)
  6. docs/es/docs/tutorial/request-files.md

    ```Python
    contents = myfile.file.read()
    ```
    
    /// note | Detalles Técnicos de `async`
    
    Cuando usas los métodos `async`, **FastAPI** ejecuta los métodos del archivo en un threadpool y los espera.
    
    ///
    
    /// note | Detalles Técnicos de Starlette
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 7.6K bytes
    - Click Count (0)
  7. docs/de/docs/async.md

    ///
    
    ### Pfadoperation-Funktionen { #path-operation-functions }
    
    Wenn Sie eine *Pfadoperation-Funktion* mit normalem `def` anstelle von `async def` deklarieren, wird sie in einem externen Threadpool ausgeführt, der dann `await`et wird, anstatt direkt aufgerufen zu werden (da dies den Server blockieren würde).
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 27.3K bytes
    - Click Count (0)
  8. docs/zh-hant/docs/advanced/stream-data.md

    而且在許多情況下,讀取它們會是阻塞操作(可能阻塞事件迴圈),因為資料是從磁碟或網路讀取。
    
    /// info
    
    上面的範例其實是例外,因為 `io.BytesIO` 物件已在記憶體中,讀取不會阻塞任何東西。
    
    但在多數情況下,讀取檔案或類檔案物件會造成阻塞。
    
    ///
    
    為了避免阻塞事件迴圈,你可以將路徑操作函式宣告為一般的 `def`(而非 `async def`),這樣 FastAPI 會在 threadpool worker 上執行它,避免阻塞主事件迴圈。
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[30:34] hl[31] *}
    
    /// tip
    
    如果你需要在 async 函式內呼叫阻塞程式碼,或在阻塞函式中呼叫 async 函式,你可以使用 [Asyncer](https://asyncer.tiangolo.com),它是 FastAPI 的姊妹函式庫。
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:33:04 GMT 2026
    - 4.9K bytes
    - Click Count (0)
  9. docs/de/docs/tutorial/request-files.md

    ```Python
    contents = myfile.file.read()
    ```
    
    /// note | Technische Details zu `async`
    
    Wenn Sie die `async`-Methoden verwenden, führt **FastAPI** die Datei-Methoden in einem <abbr title="Mehrere unabhängige Kindprozesse">Threadpool</abbr> aus und erwartet sie.
    
    ///
    
    /// note | Technische Details zu Starlette
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 8.3K bytes
    - Click Count (0)
  10. MODULE.bazel

    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Thu Apr 02 01:32:13 GMT 2026
    - 11K bytes
    - Click Count (0)
Back to Top