- Sort Score
- Num 10 results
- Language All
Results 181 - 190 of 612 for kuwait (0.04 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs/zh/docs/advanced/stream-data.md
通过使用 `with` 代码块,我们确保在生成器函数(带有 `yield` 的函数)完成后关闭这个类文件对象。也就是在发送完响应之后。 在这个特定示例中这并不那么重要,因为它是一个内存中的假文件(使用 `io.BytesIO`),但对于真实文件,确保在完成相关工作后关闭文件是很重要的。 ### 文件与异步 { #files-and-async } 大多数情况下,类文件对象默认与 async 和 await 不兼容。 例如,它们没有 `await file.read()`,也不支持 `async for chunk in file`。 而且很多情况下,读取它们是一个阻塞操作(可能会阻塞事件循环),因为数据来自磁盘或网络。 /// info | 信息 上面的示例其实是个例外,因为 `io.BytesIO` 对象已经在内存中,所以读取它不会阻塞。 但在许多情况下,读取文件或类文件对象会发生阻塞。 ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:29:48 GMT 2026 - 5.2K bytes - Click Count (0) -
internal/dsync/drwmutex.go
5*time.Second, ) } func log(format string, data ...any) { if dsyncLog { console.Printf(format, data...) } } const ( // dRWMutexAcquireTimeout - default tolerance limit to wait for lock acquisition before. drwMutexAcquireTimeout = 1 * time.Second // 1 second. // dRWMutexRefreshTimeout - default timeout for the refresh call drwMutexRefreshCallTimeout = 5 * time.Second
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 20.3K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskRunner.kt
override fun coordinatorNotify(taskRunner: TaskRunner) { taskRunner.notify() } /** * Wait a duration in nanoseconds. Unlike [java.lang.Object.wait] this interprets 0 as * "don't wait" instead of "wait forever". */ @Throws(InterruptedException::class) @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") override fun coordinatorWait(Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat Aug 30 11:30:11 GMT 2025 - 10.4K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java
* If someone called cancel(true), it is possible that the interrupted bit hasn't been set yet. * Wait for the interrupting thread to set DONE. (See interruptTask().) We want to wait so that * the interrupting thread doesn't interrupt the _next_ thing to run on this thread. * * Note: We don't reset the interrupted bit, just wait for it to be set. If this is a thread
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Jan 28 22:39:02 GMT 2026 - 10K bytes - Click Count (0) -
tensorflow/c/eager/c_api_remote_function_test.cc
} TEST(CAPI, RemoteExecuteSilentCopiesLocalAsyncFuncOrdering) { // A remote input may be not ready when we start running a function. Test that // the function execution should wait until the remote input is ready. TestRemoteExecuteSilentCopiesFunc(/*async=*/true, /*remote=*/false, /*heavy_load_on_streaming_rpc=*/true); }Created: Tue Apr 07 12:39:13 GMT 2026 - Last Modified: Fri Dec 11 22:56:03 GMT 2020 - 3.6K bytes - Click Count (0) -
docs/ru/docs/advanced/websockets.md
**FastAPI** напрямую предоставляет тот же самый `WebSocket` просто для удобства. На самом деле это `WebSocket` из Starlette. /// ## Ожидание и отправка сообщений { #await-for-messages-and-send-messages } Через эндпоинт веб-сокета вы можете получать и отправлять сообщения. {* ../../docs_src/websockets_/tutorial001_py310.py hl[48:52] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 8.2K bytes - Click Count (0) -
docs/uk/docs/advanced/stream-data.md
### Файли та async { #files-and-async } У більшості випадків об'єкти, подібні до файлів, за замовчуванням несумісні з `async` та `await`. Наприклад, у них немає `await file.read()` або `async for chunk in file`. І часто їх читання є блокувальною операцією (що може блокувати цикл подій), адже дані зчитуються з диска або мережі. /// info | Інформація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/ja/docs/tutorial/request-files.md
- `seek(offset)`: ファイル内のバイト位置 `offset`(`int`)に移動します。 - 例: `await myfile.seek(0)` はファイルの先頭に移動します。 - 一度 `await myfile.read()` を実行して、もう一度内容を読みたい場合に特に便利です。 - `close()`: ファイルを閉じます。 これらはすべて `async` メソッドなので、`await` する必要があります。 例えば、`async` の *path operation 関数* 内では次のように内容を取得できます: ```Python contents = await myfile.read() ``` 通常の `def` の *path operation 関数* 内にいる場合は、`UploadFile.file` に直接アクセスできます。例えば:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 8.7K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/custom-response.md
接收一個 async 產生器或一般的產生器/疊代器(帶有 `yield` 的函式),並以串流方式傳送回應本文。 {* ../../docs_src/custom_response/tutorial007_py310.py hl[3,16] *} /// note | 技術細節 一個 `async` 任務只能在抵達某個 `await` 時才能被取消。如果沒有 `await`,該產生器(帶有 `yield` 的函式)將無法被正確取消,甚至在請求取消後仍可能持續執行。 因為這個小範例不需要任何 `await` 陳述式,我們加入 `await anyio.sleep(0)`,讓事件迴圈有機會處理取消。 對於大型或無限的串流來說,這點更為重要。 /// /// tipCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 10.3K bytes - Click Count (0) -
docs/ru/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`.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 12.6K bytes - Click Count (0)