- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 609 for await (0.07 sec)
-
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) -
android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java
}; Thread runner = new Thread(task); runner.start(); isInterruptibleRegistered.await(); RuntimeException expected = assertThrows(RuntimeException.class, () -> task.interruptTask()); assertThat(expected) .hasMessageThat() .isEqualTo("I bet you didn't think Thread.interrupt could throw"); // We need to wait for the runner to exit. It used to be that the runner would get stuck in the
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 6.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java
assertTrue(latch.await(5, SECONDS)); assertTrue(future.isDone()); assertFalse(future.isCancelled()); assertEquals(expectedValue, future.get()); } public void testCancelledFuture() throws InterruptedException, ExecutionException { assertTrue(future.isDone()); assertTrue(future.isCancelled()); assertTrue(latch.await(5, SECONDS)); assertTrue(future.isDone());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 3.3K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
@Override protected void finalize() { latch.countDown(); } }; unused = null; // Hint to the JIT that unused is unreachable GcFinalization.await(latch); assertEquals(0, latch.getCount()); } public void testAwaitDone_future() { final SettableFuture<@Nullable Void> future = SettableFuture.create(); Object unused = new Object() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 7.9K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java
*/ public void assertSuccess(Object expectedData) throws Throwable { // Verify that the listener executed in a reasonable amount of time. Assert.assertTrue(countDownLatch.await(1L, SECONDS)); try { Assert.assertEquals(expectedData, future.get()); } catch (ExecutionException e) { throw e.getCause(); } } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 12 18:12:42 UTC 2023 - 3K bytes - Viewed (0) -
android/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) -
fastapi/datastructures.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 5.6K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/suggest/concurrent/DeferredTest.java
}); th.start(); final CountDownLatch latch = new CountDownLatch(1); deferred.promise().then(response -> latch.countDown()); assertTrue(latch.await(10, TimeUnit.SECONDS)); } @Test public void test_doneAfterResolve() throws Exception { final Deferred<SuggestResponse> deferred = new Deferred<>(); Thread th = new Thread(() -> {
Registered: Fri Nov 08 09:08:12 UTC 2024 - Last Modified: Thu Feb 22 01:36:54 UTC 2024 - 4.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java
assertEquals(3L, countDownLatch.getCount()); list.execute(); // Verify that all of the runnables execute in a reasonable amount of time. assertTrue(countDownLatch.await(1L, SECONDS)); } public void testExecute_idempotent() { final AtomicInteger runCalled = new AtomicInteger(); list.add( new Runnable() { @Override public void run() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 4.7K bytes - Viewed (0) -
tests/test_custom_middleware_exception.py
return inner async def __call__(self, scope, receive, send): if scope["type"] != "http" or self.max_content_size is None: await self.app(scope, receive, send) return wrapper = self.receive_wrapper(receive) await self.app(scope, wrapper, send) @router.post("/middleware") def run_middleware(file: UploadFile = File(..., description="Big File")):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Aug 25 21:44:40 UTC 2022 - 2.8K bytes - Viewed (0)