Created
September 5, 2013 13:36
-
-
Save mathiasp/6450181 to your computer and use it in GitHub Desktop.
Still trying to understand how binding / go blocks interact
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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