Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 141 - 150 of 216 for workerCh (0.07 seconds)

  1. 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)
  2. docs/tr/docs/index.md

        <img src="https://github.com/fastapi/fastapi/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt="Test">
    </a>
    <a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi">
        <img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi.svg" alt="Coverage">
    </a>
    <a href="https://pypi.org/project/fastapi">
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 23.2K bytes
    - Click Count (0)
  3. 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)
  4. 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)
  5. docs/zh/docs/index.md

        <img src="https://github.com/fastapi/fastapi/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt="Test">
    </a>
    <a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi">
        <img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi.svg" alt="Coverage">
    </a>
    <a href="https://pypi.org/project/fastapi">
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 20.7K bytes
    - Click Count (0)
  6. docs/en/mkdocs.yml

        - deployment/versions.md
        - deployment/fastapicloud.md
        - deployment/https.md
        - deployment/manually.md
        - deployment/concepts.md
        - deployment/cloud.md
        - deployment/server-workers.md
        - deployment/docker.md
      - How To - Recipes:
        - how-to/index.md
        - how-to/general.md
        - how-to/migrate-from-pydantic-v1-to-pydantic-v2.md
        - how-to/graphql.md
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Apr 01 16:16:24 GMT 2026
    - 9.9K bytes
    - Click Count (0)
  7. docs/ru/docs/index.md

        <img src="https://github.com/fastapi/fastapi/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt="Тест">
    </a>
    <a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi">
        <img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi.svg" alt="Покрытие">
    </a>
    <a href="https://pypi.org/project/fastapi">
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 30.4K bytes
    - Click Count (0)
  8. docs/fr/docs/advanced/stream-data.md

    ///
    
    Pour éviter de bloquer la boucle d'événements, vous pouvez simplement déclarer la *fonction de chemin d'accès* avec un `def` classique au lieu de `async def`. Ainsi, FastAPI l'exécutera dans un worker de pool de threads, afin d'éviter de bloquer la boucle principale.
    
    {* ../../docs_src/stream_data/tutorial002_py310.py ln[30:34] hl[31] *}
    
    /// tip | Astuce
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:33:45 GMT 2026
    - 6.2K bytes
    - Click Count (0)
  9. docs/en/docs/index.md

        <img src="https://github.com/fastapi/fastapi/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt="Test">
    </a>
    <a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi">
        <img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi.svg" alt="Coverage">
    </a>
    <a href="https://pypi.org/project/fastapi">
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 07 09:29:03 GMT 2026
    - 21.4K bytes
    - Click Count (0)
  10. cmd/bucket-stats.go

    			Avg:  (savg + lavg) / float64(count),
    			Curr: (lcurr + scurr) / float64(count),
    			Peak: totpeak,
    		}
    	}
    	return qs
    }
    
    // populate queue totals for node and active workers in use for metrics
    func (r *ReplicationStats) getNodeQueueStatsSummary() (qs ReplQNodeStats) {
    	qs.NodeName = globalLocalNodeName
    	qs.Uptime = UTCNow().Unix() - globalBootTime.Unix()
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 13.5K bytes
    - Click Count (0)
Back to Top