Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 640 for _wait (0.03 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

        // Cause acceptConnections() to break out.
        serverSocket.closeQuietly()
    
        // Await shutdown.
        for (queue in taskRunner.activeQueues()) {
          if (!queue.idleLatch().await(5, TimeUnit.SECONDS)) {
            throw AssertionError("Gave up waiting for queue to shut down")
          }
        }
        taskRunnerBackend.shutdown()
      }
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
  2. src/main/java/jcifs/internal/fscc/FsctlPipeWaitRequest.java

        /**
         * Constructs a pipe wait request without timeout.
         *
         * @param name the pipe name to wait for
         */
        public FsctlPipeWaitRequest(final String name) {
            this.nameBytes = name.getBytes(StandardCharsets.UTF_16LE);
            this.timeoutSpecified = false;
            this.timeout = 0;
        }
    
        /**
         * Constructs a pipe wait request with timeout.
         *
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  3. docs_src/handling_errors/tutorial006_py39.py

    async def custom_http_exception_handler(request, exc):
        print(f"OMG! An HTTP error!: {repr(exc)}")
        return await http_exception_handler(request, exc)
    
    
    @app.exception_handler(RequestValidationError)
    async def validation_exception_handler(request, exc):
        print(f"OMG! The client sent invalid data!: {exc}")
        return await request_validation_exception_handler(request, exc)
    
    
    @app.get("/items/{item_id}")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 928 bytes
    - Viewed (0)
  4. docs/pt/docs/async.md

    # Concorrência e async / await { #concurrency-and-async-await }
    
    Detalhes sobre a sintaxe `async def` para *funções de operação de rota* e alguns conceitos de código assíncrono, concorrência e paralelismo.
    
    ## Com pressa? { #in-a-hurry }
    
    <abbr title="too long; didn't read – muito longo; não li"><strong>TL;DR:</strong></abbr>
    
    Se você estiver utilizando bibliotecas de terceiros que dizem para você chamar as funções com `await`, como:
    
    ```Python
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 25.8K bytes
    - Viewed (0)
  5. docs_src/custom_request_and_route/tutorial001_an_py39.py

    from fastapi import Body, FastAPI, Request, Response
    from fastapi.routing import APIRoute
    
    
    class GzipRequest(Request):
        async def body(self) -> bytes:
            if not hasattr(self, "_body"):
                body = await super().body()
                if "gzip" in self.headers.getlist("Content-Encoding"):
                    body = gzip.decompress(body)
                self._body = body
            return self._body
    
    
    class GzipRoute(APIRoute):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 08:55:32 UTC 2025
    - 988 bytes
    - Viewed (0)
  6. docs_src/custom_request_and_route/tutorial002_an_py39.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 Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 08:55:32 UTC 2025
    - 947 bytes
    - Viewed (0)
  7. docs_src/custom_request_and_route/tutorial002_py310.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 Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 08:55:32 UTC 2025
    - 935 bytes
    - Viewed (0)
  8. tests/test_dependency_after_yield_websockets.py

    @app.websocket("/ws")
    async def websocket_endpoint(websocket: WebSocket, session: SessionDep):
        await websocket.accept()
        for item in session:
            await websocket.send_text(f"{item}")
    
    
    @app.websocket("/ws-broken")
    async def websocket_endpoint_broken(websocket: WebSocket, session: BrokenSessionDep):
        await websocket.accept()
        for item in session:
            await websocket.send_text(f"{item}")  # pragma no cover
    
    
    client = TestClient(app)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 2K bytes
    - Viewed (0)
  9. 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, e.__traceback__, limiter=exit_limiter
                )
            )
            if not ok:
                raise e
        else:
            await anyio.to_thread.run_sync(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  10. 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 Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 12.9K bytes
    - Viewed (0)
Back to top