Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 163 for teardown (0.1 sec)

  1. docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md

    # 使用yield的依赖项
    
    FastAPI支持在完成后执行一些<abbr title='有时也被称为"退出"("exit"),"清理"("cleanup"),"拆卸"("teardown"),"关闭"("close"),"上下文管理器"("context managers")。 ...'>额外步骤</abbr>的依赖项.
    
    为此,你需要使用 `yield` 而不是 `return`,然后再编写这些额外的步骤(代码)。
    
    /// tip | 提示
    
    确保在每个依赖中只使用一次 `yield`。
    
    ///
    
    /// note | "技术细节"
    
    任何一个可以与以下内容一起使用的函数:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        serializer = ExecutionSequencer.create();
        firstFuture = SettableFuture.create();
        firstCallable = new TestCallable(firstFuture);
      }
    
      @Override
      public void tearDown() throws Exception {
        executor.shutdown();
      }
    
      public void testCallableStartsAfterFirstFutureCompletes() {
        @SuppressWarnings({"unused", "nullness"})
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java

                    @Override
                    public void run() {
                      integer.getAndIncrement();
                    }
                  });
        }
      }
    
      @AfterExperiment
      void tearDown() throws Exception {
        executorService.shutdown();
      }
    
      @Footprint(exclude = {Runnable.class, Executor.class})
      public Object measureSize() {
        list = impl.newExecutionList();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/MoreFilesTest.java

      }
    
      private Path tempDir;
    
      @Override
      protected void setUp() throws Exception {
        tempDir = Files.createTempDirectory("MoreFilesTest");
      }
    
      @Override
      protected void tearDown() throws Exception {
        if (tempDir != null) {
          // delete tempDir and its contents
          Files.walkFileTree(
              tempDir,
              new SimpleFileVisitor<Path>() {
                @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 27.4K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

    # yieldを持つ依存関係
    
    FastAPIは、いくつかの<abbr title='時々"exit"、"cleanup"、"teardown"、"close"、"context managers"、 ...のように呼ばれる'>終了後の追加のステップ</abbr>を行う依存関係をサポートしています。
    
    これを行うには、`return`の代わりに`yield`を使い、その後に追加のステップを書きます。
    
    /// tip | "豆知識"
    
    `yield`は必ず一度だけ使用するようにしてください。
    
    ///
    
    /// info | "情報"
    
    これを動作させるには、**Python 3.7** 以上を使用するか、**Python 3.6** では"backports"をインストールする必要があります:
    
    ```
    pip install async-exit-stack async-generator
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  6. compat/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java

        @BeforeEach
        void setUp() {
            cli = new MavenCli();
            origBasedir = System.getProperty(MavenCli.MULTIMODULE_PROJECT_DIRECTORY);
        }
    
        @AfterEach
        void tearDown() throws Exception {
            if (origBasedir != null) {
                System.setProperty(MavenCli.MULTIMODULE_PROJECT_DIRECTORY, origBasedir);
            } else {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  7. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

    @Tag("Slow")
    class MockWebServerTest {
      @RegisterExtension
      var platform = PlatformRule()
      private val server = MockWebServer()
    
      @BeforeEach
      fun setUp() {
        server.start()
      }
    
      @AfterEach
      fun tearDown() {
        server.shutdown()
      }
    
      @Test
      fun defaultMockResponse() {
        val response = MockResponse()
        assertThat(headersToList(response)).containsExactly("Content-Length: 0")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  8. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

      var platform = PlatformRule()
    
      private lateinit var server: MockWebServer
    
      @BeforeEach
      fun setUp(server: MockWebServer) {
        this.server = server
        server.start()
      }
    
      @AfterEach
      fun tearDown() {
        server.shutdown()
      }
    
      @Test
      fun defaultMockResponse() {
        val builder = MockResponse.Builder()
        assertThat(headersToList(builder)).containsExactly("Content-Length: 0")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/dependencies/dependencies-with-yield.md

    # Abhängigkeiten mit yield
    
    FastAPI unterstützt Abhängigkeiten, die nach Abschluss einige <abbr title="Manchmal auch genannt „Exit Code“, „Cleanup Code“, „Teardown Code“, „Closing Code“, „Kontext Manager Exit Code“, usw.">zusätzliche Schritte ausführen</abbr>.
    
    Verwenden Sie dazu `yield` statt `return` und schreiben Sie die zusätzlichen Schritte / den zusätzlichen Code danach.
    
    /// tip | "Tipp"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    # Dependencies with yield
    
    FastAPI supports dependencies that do some <abbr title='sometimes also called "exit code", "cleanup code", "teardown code", "closing code", "context manager exit code", etc.'>extra steps after finishing</abbr>.
    
    To do this, use `yield` instead of `return`, and write the extra steps (code) after.
    
    /// tip
    
    Make sure to use `yield` one single time per dependency.
    
    ///
    
    /// note | "Technical Details"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14K bytes
    - Viewed (0)
Back to top