Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 81 - 90 of 695 for iowait (0.18 seconds)

  1. docs/fr/docs/async.md

    # Concurrence et async / await { #concurrency-and-async-await }
    
    Détails sur la syntaxe `async def` pour les *fonctions de chemin d'accès* et quelques rappels sur le code asynchrone, la concurrence et le parallélisme.
    
    ## Vous êtes pressés ? { #in-a-hurry }
    
    <abbr title="too long; didn't read - trop long ; pas lu"><strong>TL;DR :</strong></abbr>
    
    Si vous utilisez des bibliothèques tierces qui nécessitent d'être appelées avec `await`, telles que :
    
    ```Python
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 27.3K bytes
    - Click Count (0)
  2. docs_src/app_testing/tutorial002_py310.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
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 757 bytes
    - Click Count (0)
  3. docs/de/docs/async.md

    # Nebenläufigkeit und async / await { #concurrency-and-async-await }
    
    Details zur `async def`-Syntax für *Pfadoperation-Funktionen* und Hintergrundinformationen zu asynchronem Code, Nebenläufigkeit und Parallelität.
    
    ## In Eile? { #in-a-hurry }
    
    <abbr title="too long; didn't read - Zu lang; nicht gelesen"><strong>TL;DR:</strong></abbr>
    
    Wenn Sie Bibliotheken von Dritten verwenden, die mit `await` aufgerufen werden müssen, wie zum Beispiel:
    
    ```Python
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 27.3K bytes
    - Click Count (0)
  4. docs/fr/docs/advanced/custom-response.md

    /// note | Détails techniques
    
    Une tâche `async` ne peut être annulée que lorsqu'elle atteint un `await`. S'il n'y a pas de `await`, le générateur (fonction avec `yield`) ne peut pas être annulé correctement et peut continuer à s'exécuter même après la demande d'annulation.
    
    Comme ce petit exemple n'a besoin d'aucune instruction `await`, nous ajoutons un `await anyio.sleep(0)` pour donner une chance à la boucle d'événements de gérer l'annulation.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 12.3K bytes
    - Click Count (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/AutobahnTester.kt

              t: Throwable,
              response: Response?,
            ) {
              t.printStackTrace(System.out)
              latch.countDown()
            }
          },
        )
    
        check(latch.await(30, TimeUnit.SECONDS)) { "Timed out waiting for test $number to finish." }
        val endNanos = System.nanoTime()
        val tookMs = TimeUnit.NANOSECONDS.toMillis(endNanos - startNanos.get())
        println("Took ${tookMs}ms")
      }
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 4.6K bytes
    - Click Count (0)
  6. 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() {
        AtomicInteger runCalled = new AtomicInteger();
        list.add(runCalled::getAndIncrement, directExecutor());
        list.execute();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 4.4K bytes
    - Click Count (0)
  7. docs/tr/docs/advanced/async-tests.md

    ///
    
    Ardından app ile bir `AsyncClient` oluşturup `await` kullanarak ona async request'ler gönderebiliriz.
    
    {* ../../docs_src/async_tests/app_a_py310/test_main.py hl[9:12] *}
    
    Bu, şu kullanıma denktir:
    
    ```Python
    response = client.get('/')
    ```
    
    ...ki daha önce request'leri `TestClient` ile bu şekilde gönderiyorduk.
    
    /// tip | İpucu
    
    Yeni `AsyncClient` ile async/await kullandığımızı unutmayın; request asenkron çalışır.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 4.2K bytes
    - Click Count (0)
  8. docs/zh-hant/docs/async.md

    ## `async` 和 `await` { #async-and-await }
    
    現代 Python 版本提供一種非常直觀的方式定義非同步程式碼。這使得它看起來就像正常的「順序」程式碼,並在適當的時機替你「等待」。
    
    當某個操作需要等待才能回傳結果,並且支援這些新的 Python 特性時,你可以像這樣編寫程式碼:
    
    ```Python
    burgers = await get_burgers(2)
    ```
    
    這裡的關鍵是 `await`。它告訴 Python 必須等待 ⏸ `get_burgers(2)` 完成它的工作 🕙, 然後將結果儲存在 `burgers` 中。如此,Python 就可以在此期間去處理其他事情 🔀 ⏯ (例如接收另一個請求)。
    
    要讓 `await` 運作,它必須位於支持非同步功能的函式內。為此,只需使用 `async def` 宣告函式:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 21.7K bytes
    - Click Count (0)
  9. docs/zh/docs/async.md

    # 并发 async / await { #concurrency-and-async-await }
    
    有关路径操作函数的 `async def` 语法以及异步代码、并发和并行的一些背景知识。
    
    ## 赶时间吗? { #in-a-hurry }
    
    <abbr title="too long; didn't read - 太长;没看"><strong>TL;DR:</strong></abbr>
    
    如果你正在使用第三方库,它们会告诉你使用 `await` 关键字来调用它们,就像这样:
    
    ```Python
    results = await some_library()
    ```
    
    然后,通过 `async def` 声明你的 *路径操作函数*:
    
    ```Python hl_lines="2"
    @app.get('/')
    async def read_results():
        results = await some_library()
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 21.6K bytes
    - Click Count (0)
  10. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Connection.kt

                // that the stream has since been closed (such as if this write timed out.)
                if (!streams.containsKey(streamId)) {
                  throw IOException("stream closed")
                }
                wait() // Wait until we receive a WINDOW_UPDATE.
              }
            } catch (e: InterruptedException) {
              Thread.currentThread().interrupt() // Retain interrupted status.
              throw InterruptedIOException()
            }
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 31.9K bytes
    - Click Count (0)
Back to Top