This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn gc-managed-pool | |
"Wraps a manually managed pool to create an automatically managed pool | |
that returns resources to the pool as the doled out references are | |
garbage collected by the jvm." | |
[pool borrow return] | |
(letfn [(interfaces [x] | |
(->> (ancestors (class x)) | |
(filter class?) | |
(filter #(.isInterface %)))) | |
(create-facade [x] |