Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 271 - 280 of 368 for avait (0.02 seconds)

  1. docs/pt/docs/tutorial/testing.md

    {* ../../docs_src/app_testing/tutorial001_py310.py hl[2,12,15:18] *}
    
    /// tip | Dica
    
    Observe que as funções de teste são `def` normais, não `async def`.
    
    E as chamadas para o cliente também são chamadas normais, não usando `await`.
    
    Isso permite que você use `pytest` diretamente sem complicações.
    
    ///
    
    /// note | Detalhes Técnicos
    
    Você também pode usar `from starlette.testclient import TestClient`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 6.1K bytes
    - Click Count (0)
  2. docs/zh-hant/docs/tutorial/background-tasks.md

    ## 建立任務函式 { #create-a-task-function }
    
    建立一個作為背景任務執行的函式。
    
    它只是個可接收參數的一般函式。
    
    它可以是 `async def`,也可以是一般的 `def`,**FastAPI** 都能正確處理。
    
    在此例中,任務函式會寫入檔案(模擬寄送電子郵件)。
    
    由於寫入操作未使用 `async` 與 `await`,因此以一般的 `def` 定義該函式:
    
    {* ../../docs_src/background_tasks/tutorial001_py310.py hl[6:9] *}
    
    ## 新增背景任務 { #add-the-background-task }
    
    在路徑操作函式內,使用 `.add_task()` 將任務函式加入背景任務物件:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  3. build-tools-internal/build.gradle

      // When upgrading forbidden apis, ensure dependency version is bumped in ThirdPartyPrecommitPlugin as well
      api 'de.thetaphi:forbiddenapis:3.1'
      api 'com.avast.gradle:gradle-docker-compose-plugin:0.14.0'
      api 'org.apache.maven:maven-model:3.6.2'
      api 'com.networknt:json-schema-validator:1.0.36'
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Mon Sep 13 18:10:22 GMT 2021
    - 11.3K bytes
    - Click Count (0)
  4. docs/fr/docs/tutorial/dependencies/classes-as-dependencies.md

    # Utiliser des classes comme dépendances { #classes-as-dependencies }
    
    Avant d'aller plus loin dans le système d'**Injection de dépendances**, mettons à niveau l'exemple précédent.
    
    ## Un `dict` de l'exemple précédent { #a-dict-from-the-previous-example }
    
    Dans l'exemple précédent, nous renvoyions un `dict` depuis notre dépendance (« dependable ») :
    
    {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[9] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:12:41 GMT 2026
    - 7.5K bytes
    - Click Count (0)
  5. src/test/java/jcifs/smb/PreauthIntegrityServiceTest.java

                    } finally {
                        latch.countDown();
                    }
                });
            }
    
            assertTrue(latch.await(10, TimeUnit.SECONDS));
            executor.shutdown();
        }
    
        @Test
        @DisplayName("Test invalid session ID handling")
        public void testInvalidSessionIdHandling() {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 11.1K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

        // we really just want to wait for the thread to be in the failure callback so we wait for that
        // explicitly instead.
        failEnter.await();
        assertFalse("State should be updated before calling listeners", manager.isHealthy());
        // now we want to stop the services.
        Thread stoppingThread =
            new Thread() {
              @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 25.6K bytes
    - Click Count (0)
  7. docs/ja/docs/advanced/events.md

    ```Python
    with open("file.txt") as file:
        file.read()
    ```
    
    最近の Python には「非同期コンテキストマネージャ」もあります。`async with` で使います:
    
    ```Python
    async with lifespan(app):
        await do_stuff()
    ```
    
    このようにコンテキストマネージャ(または非同期コンテキストマネージャ)を作ると、`with` ブロックに入る前に `yield` より前のコードが実行され、`with` ブロックを出た後に `yield` より後ろのコードが実行されます。
    
    上のコード例では直接それを使ってはいませんが、FastAPI に渡して内部で使ってもらいます。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 9.9K bytes
    - Click Count (0)
  8. docs/en/docs/tutorial/background-tasks.md

    In this case, the task function will write to a file (simulating sending an email).
    
    And as the write operation doesn't use `async` and `await`, we define the function with normal `def`:
    
    {* ../../docs_src/background_tasks/tutorial001_py310.py hl[6:9] *}
    
    ## Add the background task { #add-the-background-task }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 4.7K bytes
    - Click Count (0)
  9. docs/zh-hant/docs/advanced/dataclasses.md

       同樣地,你可以把 `dataclasses` 與標準型別註記組合使用。
    8. 注意這個「路徑操作函式」使用的是一般的 `def` 而非 `async def`。
    
       一如往常,在 FastAPI 中你可以視需要混用 `def` 與 `async def`。
    
       如果需要複習何時用哪個,請參考文件中關於 [`async` 與 `await`](../async.md#in-a-hurry) 的章節「In a hurry?」。
    9. 這個「路徑操作函式」回傳的不是 dataclass(雖然也可以),而是一個包含內部資料的字典清單。
    
       FastAPI 會使用 `response_model` 參數(其中包含 dataclass)來轉換回應。
    
    你可以把 `dataclasses` 與其他型別註記以多種方式組合,形成複雜的資料結構。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 3.8K bytes
    - Click Count (0)
  10. src/test/java/org/codelibs/fess/util/InputStreamThreadTest.java

            };
    
            InputStreamThread thread = new InputStreamThread(is, StandardCharsets.UTF_8, 100, callback);
            thread.start();
    
            assertTrue("Should process all lines within timeout", latch.await(3, TimeUnit.SECONDS));
    
            thread.join(1000);
    
            assertEquals("All lines should be processed", 5000, receivedLines.size());
            assertEquals("First line", "Line number 0", receivedLines.get(0));
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sun Jan 11 08:43:05 GMT 2026
    - 12K bytes
    - Click Count (0)
Back to Top