Remove use of state container in main function

Since the main function will only ever start and stop one system, this
commit simplifies the main function to use a single lexical binding for
the system state rather than creating an Atom.

Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
This commit is contained in:
Sebastian Crane 2022-03-22 22:24:31 +00:00
parent 856432516c
commit 56094478db
1 changed files with 2 additions and 3 deletions

View File

@ -62,7 +62,6 @@
(swap! system-atom start)))
(defn -main [& args]
(let [main-system (atom (system/system))]
(swap! main-system system/start)
(let [main-system (system/start nil)]
(.addShutdownHook (Runtime/getRuntime)
(Thread. (partial swap! main-system stop)))))
(Thread. #(stop main-system)))))