justinhj <justi...@gmail.com> writes:

> I tried passing *out* to my thread function and then binding it to
> *out* in the thread, and this works but then makes the threads execute
> one at a time, and I'm presuming that is because my use of *out* in
> the binding block is blocking for the other threads which use it.

That doesn't sound right: binding itself never blocks.  Can you post
some example code where you see this behaviour?

As I understand it binding conveyance should happen automatically in the
upcoming 1.3 release (for futures and agents) but in 1.2 you can use
bound-fn, or for better performance use binding explicitly as you
suggested.

    (future-call (bound-fn [] (println "log...")))

    (send some-agent (bound-fn [x] (println "log...") (inc x)))

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