Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 44 for shutdown (3.35 sec)

  1. 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)
  2. 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)
  3. 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)
  4. docs/em/docs/advanced/events.md

    👆 💪 🚮 🌅 🌘 1️⃣ 🎉 🐕‍🦺 🔢.
    
    & 👆 🈸 🏆 🚫 ▶️ 📨 📨 ⏭ 🌐 `startup` 🎉 🐕‍🦺 ✔️ 🏁.
    
    ### `shutdown` 🎉
    
    🚮 🔢 👈 🔜 🏃 🕐❔ 🈸 🤫 🔽, 📣 ⚫️ ⏮️ 🎉 `"shutdown"`:
    
    ```Python hl_lines="6"
    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    📥, `shutdown` 🎉 🐕‍🦺 🔢 🔜 ✍ ✍ ⏸ `"Application shutdown"` 📁 `log.txt`.
    
    !!! info
         `open()` 🔢, `mode="a"` ⛓ "🎻",, ⏸ 🔜 🚮 ⏮️ ⚫️❔ 🔛 👈 📁, 🍵 📁 ⏮️ 🎚.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. docs/pt/docs/advanced/events.md

    ### Evento `shutdown`
    
    Para adicionar uma função que deve ser executada quando a aplicação estiver encerrando, declare ela com o evento `"shutdown"`:
    
    ```Python hl_lines="6"
    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    Aqui, a função de manipulação de evento `shutdown` irá escrever uma linha de texto `"Application shutdown"` no arquivo `log.txt`.
    
    !!! info "Informação"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  6. cmd/signals.go

    			if err := httpServer.Shutdown(); err != nil && !errors.Is(err, http.ErrServerClosed) {
    				shutdownLogIf(context.Background(), err)
    			}
    		}
    
    		if objAPI := newObjectLayerFn(); objAPI != nil {
    			shutdownLogIf(context.Background(), objAPI.Shutdown(context.Background()))
    		}
    
    		if srv := newConsoleServerFn(); srv != nil {
    			shutdownLogIf(context.Background(), srv.Shutdown())
    		}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 17:57:52 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt

        redQueue.shutdown()
    
        redQueue.execute("task", 100.µs) {
          // Do nothing.
        }
    
        taskFaker.assertNoMoreTasks()
    
        assertThat(testLogHandler.takeAll()).containsExactly(
          "FINE: Q10000 schedule canceled (queue is shutdown): task",
        )
      }
    
      @Test fun scheduleThrowsWhenShutdown() {
        redQueue.shutdown()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 23K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

        ignoreIoExceptions {
          socket.close()
        }
    
        // Release the threads.
        writerQueue.shutdown()
        pushQueue.shutdown()
        settingsListenerQueue.shutdown()
      }
    
      private fun failConnection(e: IOException?) {
        close(ErrorCode.PROTOCOL_ERROR, ErrorCode.PROTOCOL_ERROR, e)
      }
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

        override fun execute(
          taskRunner: TaskRunner,
          runnable: Runnable,
        ) {
          executor.execute(runnable)
        }
    
        fun shutdown() {
          executor.shutdown()
        }
      }
    
      companion object {
        val logger: Logger = Logger.getLogger(TaskRunner::class.java.name)
    
        @JvmField
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  10. cmd/erasure.go

    func (er erasureObjects) NewNSLock(bucket string, objects ...string) RWLocker {
    	return er.nsMutex.NewNSLock(er.getLockers, bucket, objects...)
    }
    
    // Shutdown function for object storage interface.
    func (er erasureObjects) Shutdown(ctx context.Context) error {
    	// Add any object layer shutdown activities here.
    	closeStorageDisks(er.getDisks()...)
    	return nil
    }
    
    // defaultWQuorum write quorum based on setDriveCount and defaultParityCount
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 06:32:14 GMT 2024
    - 16K bytes
    - Viewed (1)
Back to top