> > (alter-var-root pool #(.setParallelism % 6)) > Sorry for the nitpick, but that would just have been (.setParallelism pool 6), were it possible.
> I need to call the ctor and somehow rebind the 'pool' var to that object. > How do I do that? any ideas? (alter-var-root #'clojure.core.reducers/pool (constantly (ForkJoinPool. 6))) var-set only works on dynamically bound vars. > Would 'compare-and-set!' work in this case? are all vars wrapped in atoms? No, vars are much more primitive; basically wrappers around a volatile field, or a ThreadLocal, when dynamically bound. Their 'concurrency semantics' is just good old stochastic 'last one in wins'. So they should normally be considered read-only, except for special use cases like repl, testing, crude hacks, ... kind regards -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en