clojure - Why do agents have a pool of threads? -


in clojure documentation see agent use pool of thread process data. read (always in documentation) :

the actions of agents interleaved amongst threads in thread pool. @ point in time, @ 1 action each agent being executed.

why agent have pool of thread , not single thread process "queue" of sended function ?

thanks.

an agent not 'have pool of threads'. there 2 thread pools (for send , send-off actions), agent actions assigned.

this design decision optimal choice cpu-bound tasks, , best-effort approach io-bound tasks.

for latter case, providing own pool send-via optimal choice (assuming know you're doing).


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -