Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 2,181 for Await (0.15 sec)

  1. 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: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  2. docs_src/path_operation_advanced_configuration/tutorial006.py

                            },
                        }
                    }
                },
                "required": True,
            },
        },
    )
    async def create_item(request: Request):
        raw_body = await request.body()
        data = magic_data_reader(raw_body)
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Jul 29 20:01:13 UTC 2021
    - 1K bytes
    - Viewed (0)
  3. 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.time()
        response = await call_next(request)
        process_time = time.time() - start_time
        response.headers["X-Process-Time"] = str(process_time)
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 349 bytes
    - Viewed (0)
  4. docs_src/async_tests/test_main.py

    import pytest
    from httpx import AsyncClient
    
    from .main import app
    
    
    @pytest.mark.anyio
    async def test_root():
        async with AsyncClient(app=app, base_url="http://test") as ac:
            response = await ac.get("/")
        assert response.status_code == 200
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Oct 06 15:32:11 UTC 2021
    - 306 bytes
    - Viewed (0)
  5. platforms/extensibility/test-kit/src/integTest/groovy/org/gradle/testkit/runner/GradleRunnerResultIntegrationTest.groovy

                    doLast {
                      startLatch.countDown() // allow b to finish
                      stopLatch.await() // wait for d to start
                    }
                  }
                }
    
                project(":b") {
                  task t {
                    doLast {
                      startLatch.await() // wait for a to start
                    }
                  }
                }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 22:36:52 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  6. platforms/core-runtime/messaging/src/integTest/groovy/org/gradle/internal/remote/UnicastMessagingIntegrationTest.groovy

                client.connection.connect()
                client.outgoingService1.doStuff("from client 1")
                client.outgoingService1.doStuff("from client 2")
            }
            received.await()
            client.stop()
            server.stop()
    
            then:
            1 * serverService.doStuff("from client 1")
            1 * serverService.doStuff("from client 2") >> { received.countDown() }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 27 09:21:43 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  7. platforms/documentation/docs/src/snippets/workerApi/waitForCompletion/kotlin/build.gradle.kts

                }
            }
    
            // Wait for all asynchronous work submitted to this queue to complete before continuing
            workQueue.await()
            logger.lifecycle("Created ${outputDir.get().asFile.listFiles().size} reversed files in ${outputDir.get().asFile.toRelativeString(projectLayout.projectDirectory.asFile)}")
            // end::wait-for-completion[]
        }
    }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  8. docs_src/path_operation_advanced_configuration/tutorial007_pv1.py

            "requestBody": {
                "content": {"application/x-yaml": {"schema": Item.schema()}},
                "required": True,
            },
        },
    )
    async def create_item(request: Request):
        raw_body = await request.body()
        try:
            data = yaml.safe_load(raw_body)
        except yaml.YAMLError:
            raise HTTPException(status_code=422, detail="Invalid YAML")
        try:
            item = Item.parse_obj(data)
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 789 bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        }
    
        @Override
        public void await() throws InterruptedException {
          lock.lock();
          try {
            condition.await();
          } finally {
            lock.unlock();
          }
        }
    
        @Override
        public boolean await(long time, TimeUnit unit) throws InterruptedException {
          lock.lock();
          try {
            return condition.await(time, unit);
          } finally {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 16:06:39 UTC 2024
    - 31.7K bytes
    - Viewed (0)
  10. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/concurrent/DefaultAsyncIOScopeFactoryTest.kt

     * limitations under the License.
     */
    
    package org.gradle.kotlin.dsl.concurrent
    
    import org.awaitility.Duration.ONE_SECOND
    import org.awaitility.kotlin.atMost
    import org.awaitility.kotlin.await
    import org.awaitility.kotlin.untilNotNull
    
    import org.gradle.kotlin.dsl.support.useToRun
    
    import org.hamcrest.CoreMatchers.equalTo
    import org.hamcrest.CoreMatchers.instanceOf
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 3.7K bytes
    - Viewed (0)
Back to top