Skip to content

Instantly share code, notes, and snippets.

@rwat
Created June 1, 2010 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rwat/421550 to your computer and use it in GitHub Desktop.
Save rwat/421550 to your computer and use it in GitHub Desktop.
(ns nmanage)
(def running (atom true))
(defn process
[]
(when @running
(prn "hi")
(Thread/sleep 1000))
(recur))
;;;
(send-off (agent nil) process)
(do
(prn "this prints now - fixed thanks to Shawn Hoover")
(Thread/sleep 2000)
(reset! running false))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment