- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 603 for _wait (0.03 sec)
-
prepare_stmt.go
db.Mux.RUnlock() // wait for other goroutines prepared <-stmt.prepared if stmt.prepareErr != nil { return Stmt{}, stmt.prepareErr } return *stmt, nil } db.Mux.RUnlock() db.Mux.Lock() // double check if stmt, ok := db.Stmts[query]; ok && (!stmt.Transaction || isTransaction) { db.Mux.Unlock() // wait for other goroutines prepared <-stmt.prepared
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 6.6K bytes - Viewed (0) -
docs_src/middleware/tutorial001.py
import time from fastapi import FastAPI, Request app = FastAPI() @app.middleware("http") async def add_process_time_header(request: Request, call_next): start_time = time.perf_counter() response = await call_next(request) process_time = time.perf_counter() - start_time response.headers["X-Process-Time"] = str(process_time)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 13:46:39 UTC 2024 - 365 bytes - Viewed (0) -
docs_src/async_tests/test_main.py
from .main import app @pytest.mark.anyio async def test_root(): async with AsyncClient( transport=ASGITransport(app=app), base_url="http://test" ) as ac: response = await ac.get("/") assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 30 16:00:41 UTC 2024 - 360 bytes - Viewed (0) -
cmd/mrf.go
} now := time.Now() if now.Sub(u.Queued) < time.Second { // let recently failed networks to reconnect // making MRF wait for 1s before retrying, // i.e 4 reconnect attempts. time.Sleep(time.Second) } // wait on timer per heal wait := healSleeper.Timer(context.Background()) scan := madmin.HealNormalScan if u.BitrotScan { scan = madmin.HealDeepScan }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 13 22:26:05 UTC 2024 - 6.5K bytes - Viewed (0) -
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_route_scope.py
@app.websocket("/items/{item_id}") async def websocket_item(item_id: str, websocket: WebSocket): route: APIWebSocketRoute = websocket.scope["route"] await websocket.accept() await websocket.send_json({"item_id": item_id, "path": route.path}) client = TestClient(app) def test_get(): response = client.get("/users/rick")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Feb 08 10:23:07 UTC 2023 - 1.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DuplexTest.kt
override fun responseHeadersEnd( call: Call, response: Response, ) { try { // Wait for the server to send the duplex response before acting on the 301 response // and resetting the stream. duplexResponseSent.await() } catch (e: InterruptedException) { throw AssertionError() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 23.9K bytes - Viewed (0) -
android/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) -
docs/en/docs/tutorial/request-files.md
* `seek(offset)`: Goes to the byte position `offset` (`int`) in the file. * E.g., `await myfile.seek(0)` would go to the start of the file. * This is especially useful if you run `await myfile.read()` once and then need to read the contents again. * `close()`: Closes the file. As all these methods are `async` methods, you need to "await" them. For example, inside of an `async` *path operation function* you can get the contents with:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.2K bytes - Viewed (0) -
docs/ja/docs/async.md
# 並行処理と async / await *path operation 関数*のための `async def` に関する詳細と非同期 (asynchronous) コード、並行処理 (Concurrency)、そして、並列処理 (Parallelism) の背景について。 ## 急いでいますか? <abbr title="too long; didn't read (長すぎて読めない人のための要約という意味のスラング)"><strong>TL;DR:</strong></abbr> 次のような、`await` を使用して呼び出すべきサードパーティライブラリを使用している場合: ```Python results = await some_library() ``` 以下の様に `async def` を使用して*path operation 関数*を宣言します。 ```Python hl_lines="2" @app.get('/')
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 27.8K bytes - Viewed (0)