Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 223 for yielded (0.06 seconds)

  1. docs/en/docs/tutorial/server-sent-events.md

    ///
    
    ## Stream SSE with FastAPI { #stream-sse-with-fastapi }
    
    To stream SSE with FastAPI, use `yield` in your *path operation function* and set `response_class=EventSourceResponse`.
    
    Import `EventSourceResponse` from `fastapi.sse`:
    
    {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *}
    
    Each yielded item is encoded as JSON and sent in the `data:` field of an SSE event.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 4.6K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        // Run those tasks together.
        fakePool.runAll();
    
        // Check that the interruption of a SequentialExecutor's task is restored to the thread once
        // it is yielded. Clear the bit while checking so that the test doesn't hose JUnit or some other
        // test case.
        assertThat(Thread.interrupted()).isTrue();
      }
    
      public void testInterrupt_doesNotStopExecution() {
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 10.5K bytes
    - Click Count (0)
  3. docs/en/docs/advanced/advanced-dependencies.md

    And when using `Depends(scope="request")` (the default), the exit code after `yield` is executed after the response is sent.
    
    You can read more about it in the docs for [Dependencies with `yield` - Early exit and `scope`](../tutorial/dependencies/dependencies-with-yield.md#early-exit-and-scope).
    
    ### Dependencies with `yield` and `StreamingResponse`, Technical Details { #dependencies-with-yield-and-streamingresponse-technical-details }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 9K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        // Run those tasks together.
        fakePool.runAll();
    
        // Check that the interruption of a SequentialExecutor's task is restored to the thread once
        // it is yielded. Clear the bit while checking so that the test doesn't hose JUnit or some other
        // test case.
        assertThat(Thread.interrupted()).isTrue();
      }
    
      public void testInterrupt_doesNotStopExecution() {
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 10.5K bytes
    - Click Count (0)
  5. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    ///
    
    ## A database dependency with `yield` { #a-database-dependency-with-yield }
    
    For example, you could use this to create a database session and close it after finishing.
    
    Only the code prior to and including the `yield` statement is executed before creating a response:
    
    {* ../../docs_src/dependencies/tutorial007_py310.py hl[2:4] *}
    
    The yielded value is what is injected into *path operations* and other dependencies:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 12.6K bytes
    - Click Count (0)
  6. docs/pt/docs/advanced/advanced-dependencies.md

    ///
    
    Dependências com `yield` evoluíram ao longo do tempo para contemplar diferentes casos de uso e corrigir alguns problemas, aqui está um resumo do que mudou.
    
    ### Dependências com `yield` e `scope` { #dependencies-with-yield-and-scope }
    
    Na versão 0.121.0, o FastAPI adicionou suporte a `Depends(scope="function")` para dependências com `yield`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 9.9K bytes
    - Click Count (0)
  7. docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md

    O **FastAPI** possui suporte para dependências que realizam <dfn title='às vezes também chamado de "código de saída", "código de limpeza", "código de teardown", "código de fechamento", "código de saída do gerenciador de contexto", etc.'>alguns passos extras ao finalizar</dfn>.
    
    Para fazer isso, utilize `yield` em vez de `return`, e escreva os passos extras (código) depois.
    
    /// tip | Dica
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 13.8K bytes
    - Click Count (0)
  8. docs/ko/docs/tutorial/dependencies/dependencies-with-yield.md

    ///
    
    ## `yield`를 사용하는 데이터베이스 의존성 { #a-database-dependency-with-yield }
    
    예를 들어, 이 기능을 사용하면 데이터베이스 세션을 생성하고 작업이 끝난 후에 세션을 종료할 수 있습니다.
    
    응답을 생성하기 전에는 `yield`문을 포함하여 그 이전의 코드만이 실행됩니다:
    
    {* ../../docs_src/dependencies/tutorial007_py310.py hl[2:4] *}
    
    yield된 값은 *경로 처리* 및 다른 의존성들에 주입되는 값 입니다:
    
    {* ../../docs_src/dependencies/tutorial007_py310.py hl[4] *}
    
    `yield`문 다음의 코드는 응답을 생성한 후 실행됩니다:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 14.3K bytes
    - Click Count (0)
  9. docs/fr/docs/tutorial/dependencies/dependencies-with-yield.md

    ///
    
    ## Créer une dépendance de base de données avec `yield` { #a-database-dependency-with-yield }
    
    Par exemple, vous pouvez l'utiliser pour créer une session de base de données et la fermer après la fin.
    
    Seul le code précédant et incluant l'instruction `yield` est exécuté avant la création de la réponse :
    
    {* ../../docs_src/dependencies/tutorial007_py310.py hl[2:4] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 13.9K bytes
    - Click Count (0)
  10. docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md

    # Зависимости с yield { #dependencies-with-yield }
    
    FastAPI поддерживает зависимости, которые выполняют некоторые <dfn title='иногда также называемые "код выхода", "код очистки", "код завершения", "код закрытия", "код выхода менеджера контекста" и т.п.'>дополнительные шаги после завершения</dfn>.
    
    Для этого используйте `yield` вместо `return`, а дополнительные шаги (код) напишите после него.
    
    /// tip | Подсказка
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 19.4K bytes
    - Click Count (0)
Back to Top