Using agents in libraries bad?

16 views
Skip to first unread message

ckirkendall

unread,
Jul 3, 2011, 10:16:59 AM7/3/11
to Clojure
It seems that having non-daemon threads in the agents pool and
requiring a call shutdown agents before the jvm exits makes using
agents in a library very difficult. You either need to have as part
of your api a function that calls (shutdown-agents) or require the
consumer to know you are using agents. Having the API calls seems
scary because it can affect other running programs, if its not use
properly or in the wrong context. Other places that even these two
options fail is any library that is used by a web application in a
java web container. Nether party can call (shutdown-agents) because
you could affect other sites in the same app server.
Reply all
Reply to author
Forward
0 new messages