- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 609 for await (0.06 sec)
-
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) -
guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java
}) .start(); future.cancel(true); assertTrue(future.isCancelled()); assertTrue(future.isDone()); assertTrue(successLatch.await(200, MILLISECONDS)); assertTrue(listenerLatch.await(200, MILLISECONDS)); latch.countDown(); exec.shutdown(); exec.awaitTermination(100, MILLISECONDS); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 18:30:30 UTC 2023 - 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) -
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/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) -
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) -
docs/en/docs/js/custom.js
async function getDataBatch(page) { const response = await fetch(`https://api.github.com/search/repositories?q=topic:fastapi&per_page=100&page=${page}`, { headers: { Accept: 'application/vnd.github.mercy-preview+json' } }) const data = await response.json() return data } async function getData() { let page = 1 let data = [] let dataBatch = await getDataBatch(page) data = data.concat(dataBatch.items)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 6.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java
assertFalse(service.startUpCalled); service.startAsync().awaitRunning(); assertTrue(service.startUpCalled); assertEquals(Service.State.RUNNING, service.state()); enterRun.await(); // to avoid stopping the service until run() is invoked service.stopAsync().awaitTerminated(); assertTrue(service.shutDownCalled); assertEquals(Service.State.TERMINATED, service.state());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 12.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
// WAIT #1 barrier.await(1, SECONDS); // WAIT #2 barrier.await(1, SECONDS); assertTrue(executor.isShutdown()); assertFalse(executor.isTerminated()); // WAIT #3
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 28.1K bytes - Viewed (0)