Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 450 for eventos (0.21 sec)

  1. docs/zh/docs/advanced/events.md

    首先要注意的是,我们定义了一个带有 `yield` 的异步函数。这与带有 `yield` 的依赖项非常相似。
    
    ```Python hl_lines="14-19"
    {!../../docs_src/events/tutorial003.py!}
    ```
    
    这个函数在 `yield`之前的部分,会在应用启动前执行。
    
    剩下的部分在 `yield` 之后,会在应用完成后执行。
    
    ## 异步上下文管理器
    
    如你所见,这个函数有一个装饰器 `@asynccontextmanager` 。
    
    它将函数转化为所谓的“**异步上下文管理器**”。
    
    ```Python hl_lines="1  13"
    {!../../docs_src/events/tutorial003.py!}
    ```
    
    在 Python 中,  **上下文管理器**是一个你可以在 `with` 语句中使用的东西,例如,`open()` 可以作为上下文管理器使用。
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/eventbus/AsyncEventBus.java

     * the License.
     */
    
    package com.google.common.eventbus;
    
    import java.util.concurrent.Executor;
    
    /**
     * An {@link EventBus} that takes the Executor of your choice and uses it to dispatch events,
     * allowing dispatch to occur asynchronously.
     *
     * @author Cliff Biffle
     * @since 10.0
     */
    public class AsyncEventBus extends EventBus {
    
      /**
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/testing-events.md

    # Testing Events: lifespan and startup - shutdown { #testing-events-lifespan-and-startup-shutdown }
    
    When you need `lifespan` to run in your tests, you can use the `TestClient` with a `with` statement:
    
    {* ../../docs_src/app_testing/tutorial004_py39.py hl[9:15,18,27:28,30:32,41:43] *}
    
    
    You can read more details about the ["Running lifespan in tests in the official Starlette documentation site."](https://www.starlette.dev/lifespan/#running-lifespan-in-tests)
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 626 bytes
    - Viewed (0)
  4. api/maven-api-core/src/main/java/org/apache/maven/api/Event.java

    import org.apache.maven.api.annotations.Nonnull;
    
    /**
     * Event sent by maven during various phases of the build process.
     * Such events can be listened to using {@link Listener}s objects
     * registered in the {@link Session}.
     *
     * @since 4.0.0
     */
    @Experimental
    public interface Event {
    
        /**
         * Gets the type of the event.
         *
         * @return the type of the event, never {@code null}
         */
        @Nonnull
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Thu Mar 23 05:29:39 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  5. docs/assets/images/events@2x.png

    events@2x.png...
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 164.7K bytes
    - Viewed (0)
  6. docs/ko/docs/advanced/events.md

    {* ../../docs_src/events/tutorial003.py hl[14:19] *}
    
    함수의 첫 번째 부분, 즉 `yield` 이전의 코드는 애플리케이션이 시작되기 **전에** 실행됩니다.
    
    그리고 `yield` 이후의 부분은 애플리케이션이 완료된 후 **나중에** 실행됩니다.
    
    ### 비동기 컨텍스트 매니저
    
    함수를 확인해보면, `@asynccontextmanager`로 장식되어 있습니다.
    
    이것은 함수를 "**비동기 컨텍스트 매니저**"라고 불리는 것으로 변환시킵니다.
    
    {* ../../docs_src/events/tutorial003.py hl[1,13] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  7. guava/src/com/google/common/eventbus/Subscriber.java

        try {
          method.invoke(target, checkNotNull(event));
        } catch (IllegalArgumentException e) {
          throw new Error("Method rejected target/argument: " + event, e);
        } catch (IllegalAccessException e) {
          throw new Error("Method became inaccessible: " + event, e);
        } catch (InvocationTargetException e) {
          if (e.getCause() instanceof Error) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed May 14 19:40:47 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  8. guava/src/com/google/common/eventbus/Dispatcher.java

        // This dispatcher matches the original dispatch behavior of EventBus.
    
        /** Per-thread queue of events to dispatch. */
        @SuppressWarnings("ThreadLocalUsage") // Each Dispatcher needs its own state.
        private final ThreadLocal<Queue<Event>> queue =
            new ThreadLocal<Queue<Event>>() {
              @Override
              protected Queue<Event> initialValue() {
                return new ArrayDeque<>();
              }
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  9. docs/de/docs/advanced/testing-events.md

    # Events testen: Lifespan und Startup – Shutdown { #testing-events-lifespan-and-startup-shutdown }
    
    Wenn Sie `lifespan` in Ihren Tests ausführen müssen, können Sie den `TestClient` mit einer `with`-Anweisung verwenden:
    
    {* ../../docs_src/app_testing/tutorial004_py39.py hl[9:15,18,27:28,30:32,41:43] *}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 738 bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/eventbus/AsyncEventBusTest.java

        // We post the event, but our Executor will not deliver it until instructed.
        bus.post(EVENT);
    
        List<String> events = catcher.getEvents();
        assertTrue("No events should be delivered synchronously.", events.isEmpty());
    
        // Now we find the task in our Executor and explicitly activate it.
        List<Runnable> tasks = executor.getTasks();
        assertEquals("One event dispatch task should be queued.", 1, tasks.size());
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 2.4K bytes
    - Viewed (0)
Back to top