- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 369 for kAsync (0.19 sec)
-
fastapi/background.py
with open("log.txt", mode="w") as email_file: content = f"notification for {email}: {message}" email_file.write(content) @app.post("/send-notification/{email}") async def send_notification(email: str, background_tasks: BackgroundTasks): background_tasks.add_task(write_notification, email, message="some notification") return {"message": "Notification sent in the background"} ```
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 1.7K bytes - Viewed (0) -
docs/ko/docs/advanced/events.md
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Apr 02 22:35:55 UTC 2024 - 2.2K bytes - Viewed (0) -
src/syscall/syscall_unix.go
} if err == nil { race.Acquire(unsafe.Pointer(&ioSync)) } } if msan.Enabled && n > 0 { msan.Write(unsafe.Pointer(&p[0]), uintptr(n)) } if asan.Enabled && n > 0 { asan.Write(unsafe.Pointer(&p[0]), uintptr(n)) } return } func Write(fd int, p []byte) (n int, err error) { if race.Enabled { race.ReleaseMerge(unsafe.Pointer(&ioSync)) } if faketime && (fd == 1 || fd == 2) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 16:19:26 UTC 2024 - 12.2K bytes - Viewed (0) -
docs/em/docs/advanced/events.md
``` **🔑 👨💼** 🐍 🕳 👈 👆 💪 ⚙️ `with` 📄, 🖼, `open()` 💪 ⚙️ 🔑 👨💼: ```Python with open("file.txt") as file: file.read() ``` ⏮️ ⏬ 🐍, 📤 **🔁 🔑 👨💼**. 👆 🔜 ⚙️ ⚫️ ⏮️ `async with`: ```Python async with lifespan(app): await do_stuff() ``` 🕐❔ 👆 ✍ 🔑 👨💼 ⚖️ 🔁 🔑 👨💼 💖 🔛, ⚫️❔ ⚫️ 🔨 👈, ⏭ 🛬 `with` 🍫, ⚫️ 🔜 🛠️ 📟 ⏭ `yield`, & ⏮️ ❎ `with` 🍫, ⚫️ 🔜 🛠️ 📟 ⏮️ `yield`.
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 6.2K bytes - Viewed (0) -
pkg/controller/deployment/deployment_controller.go
func (dc *DeploymentController) updateReplicaSet(logger klog.Logger, old, cur interface{}) { curRS := cur.(*apps.ReplicaSet) oldRS := old.(*apps.ReplicaSet) if curRS.ResourceVersion == oldRS.ResourceVersion { // Periodic resync will send update events for all known replica sets. // Two different versions of the same replica set will always have different RVs. return } curControllerRef := metav1.GetControllerOf(curRS)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 24.2K bytes - Viewed (0) -
docs/en/docs/tutorial/request-files.md
* This is especially useful if you run `await myfile.read()` once and then need to read the contents again. * `close()`: Closes the file. As all these methods are `async` methods, you need to "await" them. For example, inside of an `async` *path operation function* you can get the contents with: ```Python contents = await myfile.read() ```
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Wed Mar 13 19:02:19 UTC 2024 - 10.2K bytes - Viewed (0) -
docs/zh/docs/tutorial/request-files.md
`UploadFile` 支持以下 `async` 方法,(使用内部 `SpooledTemporaryFile`)可调用相应的文件方法。 * `write(data)`:把 `data` (`str` 或 `bytes`)写入文件; * `read(size)`:按指定数量的字节或字符(`size` (`int`))读取文件内容; * `seek(offset)`:移动至文件 `offset` (`int`)字节处的位置; * 例如,`await myfile.seek(0) ` 移动到文件开头; * 执行 `await myfile.read()` 后,需再次读取已读取内容时,这种方法特别好用; * `close()`:关闭文件。 因为上述方法都是 `async` 方法,要搭配「await」使用。 例如,在 `async` *路径操作函数* 内,要用以下方式读取文件内容:
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Wed Mar 13 19:02:19 UTC 2024 - 6.9K bytes - Viewed (0) -
docs/ru/docs/tutorial/request-files.md
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Wed Mar 13 19:02:19 UTC 2024 - 15.4K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/index.md
## To `async` or not to `async` As dependencies will also be called by **FastAPI** (the same as your *path operation functions*), the same rules apply while defining your functions. You can use `async def` or normal `def`. And you can declare dependencies with `async def` inside of normal `def` *path operation functions*, or `def` dependencies inside of `async def` *path operation functions*, etc.
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 11.6K bytes - Viewed (0) -
subprojects/build-events/src/test/groovy/org/gradle/internal/build/event/DefaultBuildEventsListenerRegistryTest.groovy
when: registry.onTaskCompletion(provider) then: registry.subscriptions.size() == 1 0 * listener._ when: async { factory.fire(success) factory.fire(failure) factory.fire(skipped) signalBuildFinished() } then:
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Mar 12 02:21:10 UTC 2024 - 8K bytes - Viewed (0)