Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 260 for Hawaii (0.18 sec)

  1. guava-testlib/src/com/google/common/testing/GcFinalization.java

     * Object x = new MyClass() {
     *   ...
     *   protected void finalize() { latch.countDown(); ... }
     * };
     * x = null;  // Hint to the JIT that x is stack-unreachable
     * GcFinalization.await(latch);
     * }</pre>
     *
     * <p>Here's an example that uses a user-defined finalization predicate:
     *
     * <pre>{@code
     * final WeakHashMap<Object, Object> map = new WeakHashMap<>();
     * map.put(new Object(), Boolean.TRUE);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  2. 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, TimeUnit.SECONDS));
      }
    
      public void testExecute_idempotent() {
        final AtomicInteger runCalled = new AtomicInteger();
        list.add(
            new Runnable() {
              @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  3. 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)
    JavaScript
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 08 17:50:56 GMT 2021
    - 6.6K bytes
    - Viewed (0)
  4. fastapi/exceptions.py

        ):
            if session is None:
                raise WebSocketException(code=status.WS_1008_POLICY_VIOLATION)
            await websocket.accept()
            while True:
                data = await websocket.receive_text()
                await websocket.send_text(f"Session cookie is: {session}")
                await websocket.send_text(f"Message text was: {data}, for item ID: {item_id}")
        ```
        """
    
        def __init__(
            self,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  5. android/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);
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

        assertTrue(latch.await(5, TimeUnit.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, TimeUnit.SECONDS));
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

        assertTrue(latch.await(5, TimeUnit.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, TimeUnit.SECONDS));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  8. 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
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Feb 08 10:23:07 GMT 2023
    - 757 bytes
    - Viewed (0)
  9. fastapi/datastructures.py

            To be awaitable, compatible with async, this is run in threadpool.
            """
            return await super().seek(offset)
    
        async def close(self) -> None:
            """
            Close the file.
    
            To be awaitable, compatible with async, this is run in threadpool.
            """
            return await super().close()
    
        @classmethod
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  10. docs/fr/docs/async.md

    results = await some_library()
    ```
    Alors, déclarez vos *fonctions de chemins* avec `async def` comme ceci :
    
    ```Python hl_lines="2"
    @app.get('/')
    async def read_results():
        results = await some_library()
        return results
    ```
    
    !!! note
        Vous pouvez uniquement utiliser `await` dans les fonctions créées avec `async def`.
    
    ---
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 24K bytes
    - Viewed (0)
Back to top