- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 603 for _wait (0.03 sec)
-
docs/de/docs/async.md
# Nebenläufigkeit und async / await Details zur `async def`-Syntax für *Pfadoperation-Funktionen* und Hintergrundinformationen zu asynchronem Code, Nebenläufigkeit und Parallelität. ## In Eile? <abbr title="too long; didn't read – Zu lang; nicht gelesen"><strong>TL;DR:</strong></abbr> Wenn Sie Bibliotheken von Dritten verwenden, die mit `await` aufgerufen werden müssen, wie zum Beispiel: ```Python results = await some_library() ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 26.6K bytes - Viewed (0) -
docs_src/websockets/tutorial001.py
</html> """ @app.get("/") async def get(): return HTMLResponse(html) @app.websocket("/ws") async def websocket_endpoint(websocket: WebSocket): await websocket.accept() while True: data = await websocket.receive_text()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 1.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/AutobahnTester.kt
t: Throwable, response: Response?, ) { t.printStackTrace(System.out) latch.countDown() } }, ) check(latch.await(30, TimeUnit.SECONDS)) { "Timed out waiting for test $number to finish." } val endNanos = System.nanoTime() val tookMs = TimeUnit.NANOSECONDS.toMillis(endNanos - startNanos.get()) println("Took ${tookMs}ms") }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
fastapi/concurrency.py
exit_limiter = CapacityLimiter(1) try: yield await run_in_threadpool(cm.__enter__) except Exception as e: ok = bool( await anyio.to_thread.run_sync( cm.__exit__, type(e), e, None, limiter=exit_limiter ) ) if not ok: raise e else: await anyio.to_thread.run_sync(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Dec 25 17:57:35 UTC 2023 - 1.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 23.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DispatcherTest.kt
try { proceed.await(5, TimeUnit.SECONDS) } catch (e: InterruptedException) { throw RuntimeException(e) } chain.proceed(chain.request()) }, ) .build() val t1 = makeSynchronousCall(client.newCall(newRequest("http://a/3"))) ready.await(5, TimeUnit.SECONDS) executor.finishJob("http://a/2")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 12.7K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ForwardingCondition.java
abstract class ForwardingCondition implements Condition { abstract Condition delegate(); @Override public void await() throws InterruptedException { delegate().await(); } @Override public boolean await(long time, TimeUnit unit) throws InterruptedException { return delegate().await(time, unit); } @Override public void awaitUninterruptibly() { delegate().awaitUninterruptibly(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Apr 04 09:45:04 UTC 2023 - 1.7K bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial002.py
original_route_handler = super().get_route_handler() async def custom_route_handler(request: Request) -> Response: try: return await original_route_handler(request) except RequestValidationError as exc: body = await request.body() detail = {"errors": exc.errors(), "body": body.decode()} raise HTTPException(status_code=422, detail=detail)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 932 bytes - Viewed (0) -
docs_src/app_testing/tutorial002.py
app = FastAPI() @app.get("/") async def read_main(): return {"msg": "Hello World"} @app.websocket("/ws") async def websocket(websocket: WebSocket): await websocket.accept() await websocket.send_json({"msg": "Hello WebSocket"}) await websocket.close() def test_read_main(): client = TestClient(app) response = client.get("/") assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Feb 08 10:23:07 UTC 2023 - 757 bytes - Viewed (0) -
docs/zh/docs/tutorial/request-files.md
* `read(size)`:按指定数量的字节或字符(`size` (`int`))读取文件内容; * `seek(offset)`:移动至文件 `offset` (`int`)字节处的位置; * 例如,`await myfile.seek(0) ` 移动到文件开头; * 执行 `await myfile.read()` 后,需再次读取已读取内容时,这种方法特别好用; * `close()`:关闭文件。 因为上述方法都是 `async` 方法,要搭配「await」使用。 例如,在 `async` *路径操作函数* 内,要用以下方式读取文件内容: ```Python contents = await myfile.read() ``` 在普通 `def` *路径操作函数* 内,则可以直接访问 `UploadFile.file`,例如: ```Python
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.9K bytes - Viewed (0)