Sean's analysis is mostly correct. Doesn't really have anything to do with chaining, which is not yet a feature, but just in wanting to match expectations on shutdown when executing a -X function. There are multiple cases here:
* Use future/agent, have no background threads, expect full exit. Will wait for 1 minute for background agent pool to shutdown, so MUST have shutdown-agents or System/exit.
* Have background threads (like socket server). Expect to block and NOT exit. CANNOT use System/exit (or you kill server).
* Use future/agent, and have background threads (this case). Expect to block and NOT exit. CANNOT use System/exit (would kill server) or shutdown-agents (would kill futures/agents run from server).
I don't think there is any behavior that works for all cases by default (you can always wrap a function and do whatever you know is right).
Logged as
https://clojure.atlassian.net/browse/TDEPS-198