Hi, On 30 Okt., 12:43, Tom Davies <[EMAIL PROTECTED]> wrote: > > Then every iteration of ant behaviour (and evaporation etc.) creates > > a new thread, right? This implies that an agent is not forever bound > > to the same thread. Nor is a thread bound to one agent, as otherwise > > one could iterate with (send). Interesting. > > A thread pool of unbounded size is used so while a thread isn't bound > to one agent, a new thread won't necessarily be created, if I > understand correctly.
My understanding of send and send-off, is that with send-off a new thread outside the thread pool is used to run the agent action. For send a thread from the thread pool is used. However there is no promise made on the upper bound for the thread pool. Now in case of blocking I/O, agents could wait for input effectively removing one thread from thread pool. Which would leave less threads available for the rest. In an extreme example drying the pool completely. Since send-off uses a one-shot dedicated thread, the thread pool is not affected. Is this correct? Sincerely Meikel --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---