Skip to content

Instantly share code, notes, and snippets.

@mathiasp
Created September 5, 2013 13:36
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 mathiasp/6450181 to your computer and use it in GitHub Desktop.
Save mathiasp/6450181 to your computer and use it in GitHub Desktop.
Still trying to understand how binding / go blocks interact
(defn start-loop []
(binding [srh/*remote-uri* "/opnenablement/_shoreleave"]
(go (while true
(let [e (<! dirty_c)]
(dommy/set-text! out "SAVED!")
;;; this does not work, goes to /_shoreleave
;;; allmost regardless of where the (binding ... is
(srm/rpc (save-config "myConfig") [result]
:on-success (js/alert (str "Success: " result))
:on-error (js/alert (str "Error: " result)))
(alts! [save_c (timeout 2000)]))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment