concept thread pool in category clojure

appears as: thread pool, thread pools
Clojure: The Essential Reference

This is an excerpt from Manning's book Clojure: The Essential Reference.

These threads are often kept alive in a thread pool and with them, the function objects they ran. The function object, in turns, could be holding a reference to arbitrarily large data, even if the function already returned its results. fn* ensures that the references the function hold are set to nil atfer the result returns. This is also an important feature to have when writing macros that delegate to wrapping functions, quite a common idiomatic pattern, in order to avoid retaining memory for longer that is actually needed.

The reason why future benefits from once-only semantic is because after running the body expression the future object can stay around for arbitrarily long time (even when terminated). The once-only semantic gives the garbage collector an opportunity to remove potentially large locals even when a future is still referenced by a thread pool (a common scenario). If you decide to use future-call directly, it is advisable you use the once-only semantic to avoid potential out of memory issues.