Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 101 - 110 of 1,598 for yield (0.07 seconds)

  1. docs/zh/docs/tutorial/middleware.md

    * 它接收你的应用的每一个**请求**。
    * 然后它可以对这个**请求**做一些事情或者执行任何需要的代码。
    * 然后它将这个**请求**传递给应用程序的其他部分(某个*路径操作*)处理。
    * 之后它获取应用程序生成的**响应**(由某个*路径操作*产生)。
    * 它可以对该**响应**做一些事情或者执行任何需要的代码。
    * 然后它返回这个**响应**。
    
    /// note | 技术细节
    
    如果你有使用 `yield` 的依赖,依赖中的退出代码会在中间件之后运行。
    
    如果有任何后台任务(会在[后台任务](background-tasks.md)一节中介绍,你稍后会看到),它们会在所有中间件之后运行。
    
    ///
    
    ## 创建中间件 { #create-a-middleware }
    
    要创建中间件,你可以在函数的顶部使用装饰器 `@app.middleware("http")`。
    
    中间件函数会接收:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

          afe.initCause(t);
          throw afe;
        }
      }
    
      /**
       * Delays, via Thread.sleep, for the given millisecond delay, but if the sleep is shorter than
       * specified, may re-sleep or yield until time elapses.
       */
      @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait?
      static void delay(long millis) throws InterruptedException {
        long startTime = System.nanoTime();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 02:20:33 GMT 2026
    - 8.8K bytes
    - Click Count (0)
  3. docs/features/connections.md

    There may be many routes for a single address. For example, a webserver that is hosted in multiple datacenters may yield multiple IP addresses in its DNS response.
    
    In limited situations OkHttp will retry a route if connecting fails:
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Mar 15 09:01:42 GMT 2026
    - 5.4K bytes
    - Click Count (0)
  4. docs/en/docs/release-notes.md

    Using resources from dependencies with `yield` in background tasks is no longer supported.
    
    This change is what supports the new features, read below. 🤓
    
    ### Dependencies with `yield`, `HTTPException` and Background Tasks
    
    Dependencies with `yield` now can raise `HTTPException` and other exceptions after `yield`. 🎉
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Apr 03 12:07:04 GMT 2026
    - 631K bytes
    - Click Count (0)
  5. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

          .toUrl()
          .openConnection()
          .getInputStream() // Should succeed.
      }
    
      /**
       * Throttle the request body by sleeping 500ms after every 3 bytes. With a 6-byte request, this
       * should yield one sleep for a total delay of 500ms.
       */
      @Test
      fun throttleRequest() {
        assumeNotWindows()
        server.enqueue(
          MockResponse()
            .throttleBody(3, 500, TimeUnit.MILLISECONDS),
        )
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Thu Jul 03 13:16:34 GMT 2025
    - 22.3K bytes
    - Click Count (0)
  6. docs/zh-hant/docs/advanced/custom-response.md

    ### `StreamingResponse` { #streamingresponse }
    
    接收一個 async 產生器或一般的產生器/疊代器(帶有 `yield` 的函式),並以串流方式傳送回應本文。
    
    {* ../../docs_src/custom_response/tutorial007_py310.py hl[3,16] *}
    
    /// note | 技術細節
    
    一個 `async` 任務只能在抵達某個 `await` 時才能被取消。如果沒有 `await`,該產生器(帶有 `yield` 的函式)將無法被正確取消,甚至在請求取消後仍可能持續執行。
    
    因為這個小範例不需要任何 `await` 陳述式,我們加入 `await anyio.sleep(0)`,讓事件迴圈有機會處理取消。
    
    對於大型或無限的串流來說,這點更為重要。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 10.3K bytes
    - Click Count (0)
  7. build-tools-internal/src/main/resources/forbidden/es-server-signatures.txt

    java.time.OffsetDateTime#atZoneSimilarLocal(java.time.ZoneId)
    java.time.zone.ZoneRules#getOffset(java.time.LocalDateTime)
    
    @defaultMessage Manipulation of an OffsetDateTime may yield a time that is not valid in the desired time zone. Use ZonedDateTime instead.
    java.time.OffsetDateTime#minus(long, java.time.temporal.TemporalUnit)
    java.time.OffsetDateTime#minus(long, java.time.temporal.TemporalUnit)
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Tue Jun 08 16:53:28 GMT 2021
    - 7.6K bytes
    - Click Count (0)
  8. guava/src/com/google/common/collect/RangeMap.java

       * merge does not affect its value. For example, if {@code rangeMap} had one entry {@code [1, 5]
       * => 3} then {@code rangeMap.merge(Range.closed(0,2), 3, Math::max)} could yield a map with the
       * entries {@code [0, 1) => 3, [1, 2] => 3, (2, 5] => 3}.
       *
       * @since 28.1
       */
      void merge(
          Range<K> range,
          @Nullable V value,
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 7.6K bytes
    - Click Count (0)
  9. docs/ja/docs/tutorial/middleware.md

    * 次に、アプリケーションの残りの部分に**リクエスト**を渡して (*path operation* によって) 処理させます。
    * 次に、ミドルウェアはアプリケーション (の *path operation*) によって生成された**レスポンス**を受け取ります。
    * その**レスポンス**に対して何かを実行したり、必要なコードを実行したりできます。
    * そして、**レスポンス**を返します。
    
    /// note | 技術詳細
    
    `yield` を使った依存関係をもつ場合は、終了コードはミドルウェアの *後に* 実行されます。
    
    バックグラウンドタスク ([バックグラウンドタスク](background-tasks.md) セクションで説明します。後で確認できます) がある場合は、それらは全てのミドルウェアの *後に* 実行されます。
    
    ///
    
    ## ミドルウェアの作成 { #create-a-middleware }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 5.2K bytes
    - Click Count (0)
  10. fastapi/routing.py

                        "application code is raising an exception and a dependency with yield "
                        "has a block with a bare except, or a block with except Exception, "
                        "and is not raising the exception again. Read more about it in the "
                        "docs: https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#dependencies-with-yield-and-except"
                    )
    
            # Same as in Starlette
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 193K bytes
    - Click Count (0)
Back to Top