Hmmm, I have just missed on thing.
The problems comes when evaluation is in another thread.


(defn sleep[n] (Thread/sleep n))
(future
(eval (load-string "((fn[] (sleep 100) (println \"wowo\")) )") ))



The solution is:


(defn sleep[n] (Thread/sleep n))
(let [a (get-thread-bindings) ]
(future
(with-bindings a
(eval (load-string "((fn[] (sleep 100) (println \"wowo\")) )") ))))


I will try it on my code. Thanks anyway!

-- 
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

Reply via email to