Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 247 for Shutdown (0.17 sec)

  1. okhttp/src/main/kotlin/okhttp3/WebSocket.kt

       * message buffer (16 MiB) will be rejected and trigger a [graceful shutdown][close] of this web
       * socket. This method returns false in that case, and in any other case where this web socket is
       * closing, closed, or canceled.
       *
       * This method returns immediately.
       */
      fun send(bytes: ByteString): Boolean
    
      /**
       * Attempts to initiate a graceful shutdown of this web socket. Any already-enqueued messages will
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  2. 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)
  3. docs/ko/docs/advanced/events.md

    하나 이상의 이벤트 핸들러 함수를 추가할 수도 있습니다.
    
    그리고 응용 프로그램은 모든 `startup` 이벤트 핸들러가 완료될 때까지 요청을 받지 않습니다.
    
    ## `shutdown` 이벤트
    
    응용 프로그램이 종료될 때 실행하려는 함수를 추가하려면 `"shutdown"` 이벤트로 선언합니다:
    
    ```Python hl_lines="6"
    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    이 예제에서 `shutdown` 이벤트 핸들러 함수는 `"Application shutdown"`이라는 텍스트가 적힌 `log.txt` 파일을 추가할 것입니다.
    
    !!! info "정보"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 22:35:55 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  4. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

                  }
                }
              });
          this.shutdown = shutdown;
          start();
        }
    
        void shutdown() {
          shutdown.set(true);
          while (this.isAlive()) {
            Thread.yield();
          }
        }
      }
    
      void assertWrapsInterruptedException(RuntimeException e) {
        assertThat(e).hasMessageThat().contains("Unexpected interrupt");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  5. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

                  }
                }
              });
          this.shutdown = shutdown;
          start();
        }
    
        void shutdown() {
          shutdown.set(true);
          while (this.isAlive()) {
            Thread.yield();
          }
        }
      }
    
      void assertWrapsInterruptedException(RuntimeException e) {
        assertThat(e).hasMessageThat().contains("Unexpected interrupt");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/AbstractExecutionThreadService.java

                      // which case we should skip right down to shutdown.
                      if (isRunning()) {
                        try {
                          AbstractExecutionThreadService.this.run();
                        } catch (Throwable t) {
                          restoreInterruptIfIsInterruptedException(t);
                          try {
                            shutDown();
                          } catch (Exception ignored) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  7. docs/zh/docs/advanced/events.md

    本例中,`startup` 事件处理器函数为项目数据库(只是**字典**)提供了一些初始值。
    
    **FastAPI** 支持多个事件处理器函数。
    
    只有所有 `startup` 事件处理器运行完毕,**FastAPI** 应用才开始接收请求。
    
    ## `shutdown` 事件
    
    使用 `shutdown` 事件声明 `app` 关闭时运行的函数:
    
    ```Python hl_lines="6"
    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    此处,`shutdown` 事件处理器函数在 `log.txt` 中写入一行文本 `Application shutdown`。
    
    !!! info "说明"
    
        `open()` 函数中,`mode="a"` 指的是**追加**。因此这行文本会添加在文件已有内容之后,不会覆盖之前的内容。
    
    !!! tip "提示"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

            .build()
        url =
          serverIpv4.url("/")
            .newBuilder()
            .host("localhost")
            .build()
      }
    
      @AfterEach
      internal fun tearDown() {
        serverIpv4.shutdown()
        serverIpv6.shutdown()
      }
    
      @Test
      fun callIpv6FirstEvenWhenIpv4IpIsListedFirst() {
        dnsResults =
          listOf(
            localhostIpv4,
            localhostIpv6,
          )
        serverIpv4.enqueue(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  9. internal/http/server.go

    		return srv.Server.Serve(l)
    	}
    
    	return
    }
    
    // Shutdown - shuts down HTTP server.
    func (srv *Server) Shutdown() error {
    	srv.listenerMutex.Lock()
    	if srv.listener == nil {
    		srv.listenerMutex.Unlock()
    		return http.ErrServerClosed
    	}
    	srv.listenerMutex.Unlock()
    
    	if atomic.AddUint32(&srv.inShutdown, 1) > 1 {
    		// shutdown in progress
    		return http.ErrServerClosed
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 09 21:25:16 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  10. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt

          return delegate.dispatch(request.unwrap()).wrap()
        }
    
        override fun peek(): mockwebserver3.MockResponse {
          return delegate.peek().wrap()
        }
    
        override fun shutdown() {
          delegate.shutdown()
        }
      }
    }
    
    internal fun MockResponse.wrap(): mockwebserver3.MockResponse {
      val result = mockwebserver3.MockResponse.Builder()
      val copyFromWebSocketListener = webSocketListener
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
Back to top