Actors in Clojure
I am writing a utility in开发者_StackOverflow中文版 Scala that includes a "file copy" actor. I send file names to be copied and the actor does them one at a time.
How would I to do the same thing in Clojure using agents?
Why you need to perform this using agents? because you want to copy them asynchronously? But if you still want to do this, you can use something like:
(do-all (for [x file-names] (send-off agent-name copy-function x)))
although, maybe it's better to use futures?
精彩评论