On Wed, Jun 16, 2010 at 10:20 PM, Meikel Brandmeyer <[email protected]> wrote:
> The typical solution for your problem would probably be:
>
> (->> long-running-function-with-recur Thread. .start)
>
> This starts you function in a dedicated thread and you can save the overhead 
> of send-off and use recur directly. I'm unsure about using future here. For 
> me future is a thing, which returns something. Using it for a process which 
> does return something useful seems "dirty" to me.

I agree, it still feels a little dirty to use a future without caring
about the return value but on the positive said you get an easy way to
block and wait for the tread to finish (deref) and you also get
future-done?, future-cancel and future-cancelled which can prove
useful.

Christophe


-- 
European Clojure Training Session: Brussels, 23-25/6 http://conj-labs.eu/
Professional: http://cgrand.net/ (fr)
On Clojure: http://clj-me.cgrand.net/ (en)

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

Reply via email to