Yes there are other alternatives, but consider this. (doseq [url urls] (let [agt (http-agent url)] (send-off agt some-action)))
I think that some-action should be able to use string and result as the HTTP request is complete at this stage. However some-action can't as both string and result call await without first checking if the HTTP request is complete and you can't await in an action. If my understanding is correct the code above would start as many agents as there are urls and clojure is free to distribute those agents in whatever manner it sees fit. The only guarantee clojure makes is that some-action will be called after all the previous actions sent from the same thread are complete (which includes the ones sent by http-agent itself). In other words some-action can rely on the fact that the HTTP request has finished by the time it gets called. In my case it is important to the code in some-action that http-agent has finished as not all of the http-agent accessors return results when the :handler is called, eg status returns NIL during the :handler. I guess the real question is this, is this a bug in http-agent or an http-agent usage error on my part? -- sim -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en