- Sort Score
- Num 10 results
- Language All
Results 31 - 40 of 748 for asyncId (0.06 seconds)
-
docs/ko/docs/tutorial/stream-json-lines.md
/// tip Pydantic이 **Rust** 측에서 직렬화하므로, 반환 타입을 선언하지 않았을 때보다 훨씬 높은 **성능**을 얻게 됩니다. /// ### 비동기 아님 *경로 처리 함수* { #non-async-path-operation-functions } 일반 `def` 함수(`async` 없이)도 사용할 수 있으며, 동일하게 `yield`를 사용할 수 있습니다. FastAPI가 이벤트 루프를 막지 않도록 올바르게 실행되게 보장합니다. 이 경우 함수가 async가 아니므로, 올바른 반환 타입은 `Iterable[Item]`입니다: {* ../../docs_src/stream_json_lines/tutorial001_py310.py ln[27:30] hl[28] *} ### 반환 타입 생략 { #no-return-type }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:56:39 GMT 2026 - 4.8K bytes - Click Count (0) -
fastapi/.agents/skills/fastapi/SKILL.md
## Async vs Sync *path operations* Use `async` *path operations* only when fully certain that the logic called inside is compatible with async and await (it's called with `await`) or that doesn't block. ```python from fastapi import FastAPI app = FastAPI() # Use async def when calling async code @app.get("/async-items/") async def read_async_items():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 10:05:57 GMT 2026 - 10.1K bytes - Click Count (0) -
docs/ko/docs/advanced/stream-data.md
하지만 실제 파일이나 파일 유사 객체를 읽을 때는 블로킹되는 경우가 많습니다. /// 이벤트 루프가 블로킹되는 것을 피하려면 경로 처리 함수를 `async def` 대신 일반 `def`로 선언하세요. 그러면 FastAPI가 스레드풀 워커에서 실행하여 메인 루프가 막히지 않도록 합니다. {* ../../docs_src/stream_data/tutorial002_py310.py ln[30:34] hl[31] *} /// tip | 팁 비동기 함수 안에서 블로킹 코드를 호출해야 하거나, 반대로 블로킹 함수 안에서 비동기 함수를 호출해야 한다면 FastAPI의 형제 라이브러리인 [Asyncer](https://asyncer.tiangolo.com)를 사용할 수 있습니다. /// ### `yield from` { #yield-from }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:56:39 GMT 2026 - 6.2K bytes - Click Count (0) -
docs/tr/docs/advanced/stream-data.md
### Dosyalar ve Async { #files-and-async } Çoğu durumda dosya benzeri nesneler, varsayılan olarak async ve await ile uyumlu değildir. Örneğin, `await file.read()` ya da `async for chunk in file` gibi şeyler yoktur.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:51:35 GMT 2026 - 5.8K bytes - Click Count (0) -
docs/ru/docs/advanced/stream-data.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 8.9K bytes - Click Count (0) -
docs/es/docs/advanced/stream-data.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:12:26 GMT 2026 - 5.7K bytes - Click Count (0) -
docs/de/docs/advanced/stream-data.md
### Dateien und Async { #files-and-async } In den meisten Fällen sind dateiähnliche Objekte standardmäßig nicht mit async und await kompatibel. Beispielsweise haben sie kein `await file.read()` oder `async for chunk in file`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:48:21 GMT 2026 - 6K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/stream-data.md
在這個範例中因為是存在記憶體的假檔案(`io.BytesIO`),影響不大;但若是實際檔案,務必在處理完成後關閉檔案。 ### 檔案與 Async { #files-and-async } 多數情況下,類檔案物件預設不相容於 async/await。 例如,它們沒有 `await file.read()`,也不支援 `async for chunk in file`。 而且在許多情況下,讀取它們會是阻塞操作(可能阻塞事件迴圈),因為資料是從磁碟或網路讀取。 /// info 上面的範例其實是例外,因為 `io.BytesIO` 物件已在記憶體中,讀取不會阻塞任何東西。 但在多數情況下,讀取檔案或類檔案物件會造成阻塞。 /// 為了避免阻塞事件迴圈,你可以將路徑操作函式宣告為一般的 `def`(而非 `async def`),這樣 FastAPI 會在 threadpool worker 上執行它,避免阻塞主事件迴圈。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) -
docs/uk/docs/advanced/stream-data.md
{* ../../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: Thu Mar 19 18:25:54 GMT 2026 - 8.5K bytes - Click Count (0) -
docs/pt/docs/advanced/stream-data.md
### Arquivos e async { #files-and-async } Na maioria dos casos, objetos semelhantes a arquivo não são compatíveis com async e await por padrão. Por exemplo, eles não têm `await file.read()`, nem `async for chunk in file`.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)