This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-17
Channels
- # announcements (24)
- # babashka (22)
- # beginners (49)
- # cider (16)
- # clj-kondo (8)
- # cljsrn (4)
- # clojure (87)
- # clojure-australia (7)
- # clojure-europe (44)
- # clojure-nl (4)
- # clojure-sweden (7)
- # clojure-uk (24)
- # clojurescript (5)
- # core-async (7)
- # cryogen (8)
- # cursive (22)
- # data-oriented-programming (2)
- # datomic (1)
- # emacs (6)
- # events (4)
- # fulcro (11)
- # google-cloud (1)
- # introduce-yourself (1)
- # java (8)
- # jobs (3)
- # lsp (10)
- # observability (1)
- # off-topic (12)
- # polylith (12)
- # re-frame (6)
- # reitit (36)
- # remote-jobs (1)
- # ring (4)
- # ring-swagger (1)
- # rum (4)
- # schema (1)
- # shadow-cljs (18)
- # sql (56)
- # tools-deps (33)
Saw this in some code:
shutdown-sigterm (.addShutdownHook
(Runtime/getRuntime)
(Thread. ^Runnable (fn []
(log/fatal "Triggered shutdown via SIGTERM")
(a/>!! shutdown-trigger-channel {:meta :sigterm})
;; put message into shutdown trigger channel then
;; block until shutdown-complete
(a/<!! shutdown-complete-channel))))
Is that even makes a sense? this .addShutdownHook?this is inside of a function inside a let
that means that when the function finishes to run, it tries to shutdown the system?
is it needed for core-async?