addShutdownHandler

Register a handler to be called when a shutdown is requested. The handler should close network connections and cancel timers, thus removing all owned resources from the event loop which would block it from exiting cleanly.

  1. void addShutdownHandler(void delegate(scope const(char)[] reason) fn)
    void
    addShutdownHandler
    (
    void delegate
    (
    scope const(char)[] reason
    )
    fn
    )
  2. void addShutdownHandler(void delegate() fn)

Meta