Fork me on GitHub
#boot
<
2019-04-10
>
jeroenvandijk07:04:17

Ok this seems to work

(def pool-fn (boot.pod/pod-pool {} :size 5 :destroy (fn [_] (println "destroying pod")) :init (fn [_] (println "new pod"))))

;; Take a pod out of the pool. Will be destroyed when there are no references to the pod. A new pod is started
(pool-fn :take)

jeroenvandijk07:04:54

I tried to use https://clojars.org/boot/pod outside of the boot environment. But i guess this is not supported? I get this when I try it:

Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:381).

flyboarder11:04:00

@jeroenvandijk correct, boot namespaces are designed for use within boot, not other environments...... yet!