Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 248 for shutdown (0.18 sec)

  1. guava-testlib/src/com/google/common/util/concurrent/testing/TestingExecutors.java

        private volatile boolean shutdown;
    
        @Override
        public void shutdown() {
          shutdown = true;
        }
    
        @Override
        public List<Runnable> shutdownNow() {
          shutdown();
          return ImmutableList.of();
        }
    
        @Override
        public boolean isShutdown() {
          return shutdown;
        }
    
        @Override
        public boolean isTerminated() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri May 26 22:04:00 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        application.addDelayedShutdownHook(service, 2, TimeUnit.SECONDS);
        verify(service, Mockito.never()).shutdown();
        application.shutdown();
        InOrder shutdownFirst = Mockito.inOrder(service);
        shutdownFirst.verify(service).shutdown();
        shutdownFirst.verify(service).awaitTermination(2, TimeUnit.SECONDS);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

     * the "running" state need to perform a periodic task. Subclasses can implement {@link #startUp},
     * {@link #shutDown} and also a {@link #runOneIteration} method that will be executed periodically.
     *
     * <p>This class uses the {@link ScheduledExecutorService} returned from {@link #executor} to run
     * the {@link #startUp} and {@link #shutDown} methods and also uses that service to schedule the
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 25.8K bytes
    - Viewed (0)
  4. tests/test_router_events.py

            state.app_startup = True
    
        @app.on_event("shutdown")
        def app_shutdown() -> None:
            state.app_shutdown = True
    
        router = APIRouter()
    
        @router.on_event("startup")
        def router_startup() -> None:
            state.router_startup = True
    
        @router.on_event("shutdown")
        def router_shutdown() -> None:
            state.router_shutdown = True
    
        sub_router = APIRouter()
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

        private final Object lock = new Object();
    
        /*
         * Conceptually, these two variables describe the executor being in
         * one of three states:
         *   - Active: shutdown == false
         *   - Shutdown: runningTasks > 0 and shutdown == true
         *   - Terminated: runningTasks == 0 and shutdown == true
         */
        @GuardedBy("lock")
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/RecordingExecutor.kt

            return
          }
        }
        throw AssertionError("No such job: $url")
      }
    
      override fun shutdown() {
        shutdown = true
      }
    
      override fun shutdownNow(): List<Runnable> {
        throw UnsupportedOperationException()
      }
    
      override fun isShutdown(): Boolean {
        return shutdown
      }
    
      override fun isTerminated(): Boolean {
        throw UnsupportedOperationException()
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/tests/ConcurrencyTest.java

                    while ( !this.started ) {
                        this.startedLock.wait();
                    }
                }
            }
    
    
            public void shutdown () {
                this.shutdown = true;
                synchronized ( this.shutdownLock ) {
                    this.shutdownLock.notify();
                }
            }
    
    
            /**
             * {@inheritDoc}
             *
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Nov 14 17:40:50 GMT 2021
    - 17.6K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/events.md

    ### `shutdown` event
    
    To add a function that should be run when the application is shutting down, declare it with the event `"shutdown"`:
    
    ```Python hl_lines="6"
    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    Here, the `shutdown` event handler function will write a text line `"Application shutdown"` to a file `log.txt`.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/util/concurrent/testing/TestingExecutors.java

        private volatile boolean shutdown;
    
        @Override
        public void shutdown() {
          shutdown = true;
        }
    
        @Override
        public List<Runnable> shutdownNow() {
          shutdown();
          return ImmutableList.of();
        }
    
        @Override
        public boolean isShutdown() {
          return shutdown;
        }
    
        @Override
        public boolean isTerminated() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 26 22:04:00 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/testing-events.md

    # Testing Events: startup - shutdown
    
    When you need your event handlers (`startup` and `shutdown`) to run in your tests, you can use the `TestClient` with a `with` statement:
    
    ```Python hl_lines="9-12  20-24"
    {!../../../docs_src/app_testing/tutorial003.py!}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 29 14:02:58 GMT 2020
    - 262 bytes
    - Viewed (0)
Back to top