> When you send-off an action to an agent, that agent gets is > allocated a thread for at least the duration of that action. So > using send-off on long-running actions to two agents will result > in those actions being run in parallel.
Ok, I re-read the docs on agents, and it looks like they don't do what I was thinking they do. One thread acts on an agent at once; I somehow missed that. I was thinking that multiple sends could run on one agent at once, which just isn't the case. > And finally, there's really nothing wrong with using (.start > (Thread. myfn)), if that accomplishes exactly what you need. I'm guessing that's what I'll wind up doing. I know it's not clojure's style, but it just seems like there should be some core macro (dothread ...) that puts the body into a (.start (Thread. ...)) call. I guess I'll write one :) > --Chouser > http://joyofclojure.com/ Reading through it right now. Very nice book so far, but I'm really looking forward to chapters 9 and 10 :) -- 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