Hmm... Beware of dead-lock? Maybe one should use send-off in a future combined with a promise? futures use the same thread pool as agents. A carefully crafted program (read: the real world) could use all threads for futures waiting for the sends to execute which might never happen. Would send-off solve this?
> (defn trigger-parse > ([] (trigger-parse 0) > ([delay-in-millis] > (future > (when (pos? delay-in-millis) > (Thread/sleep delay-in-millis)) > (let [result (promise)] > (send *parser* #(do (deliver result @%) %))) > �...@result))))) -- 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