Skip to content

Instantly share code, notes, and snippets.

@mwmitchell
Created April 4, 2012 14:47
Show Gist options
  • Save mwmitchell/2302060 to your computer and use it in GitHub Desktop.
Save mwmitchell/2302060 to your computer and use it in GitHub Desktop.
(let [res (atom nil)
response-future (medusa/medusa-future
;; logging the result of client/post shows the correct value
(swap! res (fn [_]
(client/post config/rtd-url
{:headers default-headers
:body xml })))]
;; this yields nil
(.get response-future 3000 java.util.concurrent.TimeUnit/MILLISECONDS)
@res)
@algoriffic
Copy link

Maybe it's throwing an exception? HOw does clojure handle a timeout exception?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment