On Sep 3, 2:35 am, Brian Goslinga <[email protected]> wrote: > The future is probably executing in a different thread, so the dynamic > binding of *ns* probably isn't the user namespace.
Thanks Brian. That's exactly what happens: user> (future *ns*) #<core$future_call$reify__5496@489a44f1: :pending> user> (deref *1) #<Namespace clojure.core> Thus, I have to either re-bind *ns* or use one of the bound-fn forms: user> (future (binding [*ns* (the-ns 'user)] (eval '(my-inc 1)))) #<core$future_call$reify__5496@eaa4c7c: :pending> user> (deref *1) 2 user> (pmap (bound-fn* eval) '((my-inc 1) (my-inc 2))) (2 3) Thanks again, Nils -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
