- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 609 for await (0.08 sec)
-
okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt
throw RuntimeException("boom!") } queue.schedule("task", TimeUnit.MILLISECONDS.toNanos(200)) { log.put("normal task running") return@schedule -1L } queue.idleLatch().await(500, TimeUnit.MILLISECONDS) assertThat(log.take()).isEqualTo("failing task running") assertThat(log.take()).isEqualTo("uncaught exception: java.lang.RuntimeException: boom!")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.5K bytes - Viewed (0) -
compat/maven-embedder/src/test/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListenerTest.java
}); } // start all threads at once try { startLatch.await(); } catch (InterruptedException e) { e.printStackTrace(); } // wait for all thread to end try { endLatch.await(); } catch (InterruptedException e) { e.printStackTrace(); }
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 5K bytes - Viewed (0) -
fastapi/exception_handlers.py
content={"detail": jsonable_encoder(exc.errors())}, ) async def websocket_request_validation_exception_handler( websocket: WebSocket, exc: WebSocketRequestValidationError ) -> None: await websocket.close( code=WS_1008_POLICY_VIOLATION, reason=jsonable_encoder(exc.errors())
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 19:08:14 UTC 2023 - 1.3K bytes - Viewed (0) -
android/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);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 11.6K bytes - Viewed (0) -
tests/test_tutorial/test_async_tests/test_main.py
import pytest from docs_src.async_tests.test_main import test_root @pytest.mark.anyio async def test_async_testing():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 06 15:32:11 UTC 2021 - 143 bytes - Viewed (0) -
docs/pt/docs/tutorial/request-files.md
* `read(size)`: Lê `size` (`int`) bytes/caracteres do arquivo. * `seek(offset)`: Vai para o byte na posição `offset` (`int`) no arquivo. * Por exemplo, `await myfile.seek(0)` irá para o início do arquivo. * Isso é especialmente útil se você executar `await myfile.read()` uma vez e precisar ler o conteúdo novamente. * `close()`: Fecha o arquivo. Como todos esses métodos são métodos `assíncronos`, você precisa "aguardar" por eles.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 30 19:52:32 UTC 2024 - 7.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/eventbus/DispatcherTest.java
final CountDownLatch latch = new CountDownLatch(2); new Thread( new Runnable() { @Override public void run() { try { barrier.await(); } catch (Exception e) { throw new AssertionError(e); } dispatcher.dispatch(2, integerSubscribers.iterator()); latch.countDown();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 27 15:41:25 UTC 2022 - 5.6K bytes - Viewed (0) -
docs/ru/docs/tutorial/request-files.md
* `seek(offset)`: Перейти к байту на позиции `offset` (`int`) в файле. * Наример, `await myfile.seek(0)` перейдет к началу файла. * Это особенно удобно, если вы один раз выполнили команду `await myfile.read()`, а затем вам нужно прочитать содержимое файла еще раз. * `close()`: Закрыть файл. Поскольку все эти методы являются `async` методами, вам следует использовать "await" вместе с ними.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 15.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt
override fun onResponse( call: Call, response: Response, ) { response.close() latch.countDown() } }, ) latch.await() assertThat(call.isCanceled()).isTrue() assertThat(exceptionRef.get()).isNotNull() } @Test fun timeoutProcessing() { server.enqueue( MockResponse.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.5K bytes - Viewed (0) -
docs/em/docs/advanced/async-tests.md
⤴️ 👥 💪 ✍ `AsyncClient` ⏮️ 📱, & 📨 🔁 📨 ⚫️, ⚙️ `await`. ```Python hl_lines="9-12" {!../../docs_src/async_tests/test_main.py!} ``` 👉 🌓: ```Python response = client.get('/') ``` ...👈 👥 ⚙️ ⚒ 👆 📨 ⏮️ `TestClient`. /// tip 🗒 👈 👥 ⚙️ 🔁/⌛ ⏮️ 🆕 `AsyncClient` - 📨 🔁. /// ## 🎏 🔁 🔢 🤙
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3K bytes - Viewed (0)