- Sort Score
- Result 10 results
- Languages All
Results 271 - 280 of 656 for iowait (0.03 sec)
-
docs/zh/docs/advanced/events.md
```Python with open("file.txt") as file: file.read() ``` Python 的最近几个版本也有了一个**异步上下文管理器**,你可以通过 `async with` 来使用: ```Python async with lifespan(app): await do_stuff() ``` 你可以像上面一样创建了一个上下文管理器或者异步上下文管理器,它的作用是在进入 `with` 块时,执行 `yield` 之前的代码,并且在离开 `with` 块时,执行 `yield` 后面的代码。 但在我们上面的例子里,我们并不是直接使用,而是传递给 FastAPI 来供其使用。
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 7K bytes - Viewed (0) -
docs/throttle/README.md
MinIO server allows to throttle incoming requests: - limit the number of active requests allowed across the cluster - limit the wait duration for each request in the queue These values are enabled using server's configuration or environment variables. ## Examples ### Configuring connection limit
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 16 08:43:49 UTC 2024 - 1.5K bytes - Viewed (1) -
helm/minio/templates/_helper_create_policy.txt
MC_CONFIG_DIR="{{ .Values.configPathmc }}" MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" {{- else }} MC="/usr/bin/mc --insecure" {{- end }} # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available connectToMinio() { SCHEME=$1 ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts set -e ; # fail if we can't read the keys.Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Tue Mar 21 06:38:06 UTC 2023 - 2K bytes - Viewed (0) -
docs/uk/docs/index.md
return {"item_id": item_id, "q": q} ``` <details markdown="1"> <summary>Або використайте <code>async def</code>...</summary> Якщо ваш код використовує `async` / `await`, скористайтеся `async def`: ```Python hl_lines="9 14" from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/") async def read_root():Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 24.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/TestThread.java
/** * Asserts that a prior call that had caused this thread to block or wait has since returned * normally. */ public void assertPriorCallReturns(@Nullable String methodName) throws Exception { assertEquals(null, getResponse(methodName).getResult()); } /** * Asserts that a prior call that had caused this thread to block or wait has since returned the * expected boolean value. */
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 21:00:51 UTC 2025 - 11.4K bytes - Viewed (0) -
docs/zh/docs/tutorial/background-tasks.md
**FastAPI** 会创建一个 `BackgroundTasks` 类型的对象并作为该参数传入。 ## 创建一个任务函数 创建要作为后台任务运行的函数。 它只是一个可以接收参数的标准函数。 它可以是 `async def` 或普通的 `def` 函数,**FastAPI** 知道如何正确处理。 在这种情况下,任务函数将写入一个文件(模拟发送电子邮件)。 由于写操作不使用 `async` 和 `await`,我们用普通的 `def` 定义函数: {* ../../docs_src/background_tasks/tutorial001.py hl[6:9] *} ## 添加后台任务 在你的 *路径操作函数* 里,用 `.add_task()` 方法将任务函数传到 *后台任务* 对象中: {* ../../docs_src/background_tasks/tutorial001.py hl[14] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 4.7K bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/TestLocking.java
final byte[] buf = new byte[1024]; for (int ii = 0; ii < numIter; ii++) { synchronized (this) { ltime = System.currentTimeMillis(); wait(); } try { final double r = Math.random(); if (r < 0.333) { f.exists();
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 4.2K bytes - Viewed (0) -
docs/es/docs/tutorial/background-tasks.md
En este caso, la función de tarea escribirá en un archivo (simulando el envío de un email). Y como la operación de escritura no usa `async` y `await`, definimos la función con un `def` normal: {* ../../docs_src/background_tasks/tutorial001_py39.py hl[6:9] *} ## Agregar la tarea en segundo plano { #add-the-background-task }
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 5.1K bytes - Viewed (0) -
cmd/bitrot-streaming.go
b.closeWithErr(err) } return n, err } func (b *streamingBitrotWriter) Close() error { // Close the underlying writer. // This will also flush the ring buffer if used. err := b.iow.Close() // Wait for all data to be written before returning else it causes race conditions. // Race condition is because of io.PipeWriter implementation. i.e consider the following // sequent of operations: // 1) pipe.Write()
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Jan 17 19:19:30 UTC 2025 - 6.2K bytes - Viewed (0) -
docs/zh/docs/tutorial/testing.md
为你需要检查的地方用标准的Python表达式写个简单的 `assert` 语句(重申,标准的`pytest`)。 {* ../../docs_src/app_testing/tutorial001.py hl[2,12,15:18] *} /// tip | 提示 注意测试函数是普通的 `def`,不是 `async def`。 还有client的调用也是普通的调用,不是用 `await`。 这让你可以直接使用 `pytest` 而不会遇到麻烦。 /// /// note | 技术细节 你也可以用 `from starlette.testclient import TestClient`。 **FastAPI** 提供了和 `starlette.testclient` 一样的 `fastapi.testclient`,只是为了方便开发者。但它直接来自Starlette。Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 5.9K bytes - Viewed (0)