pool:Clojure 的池化库

时间:2021-06-03 15:48:17
【文件属性】:
文件名称:pool:Clojure 的池化库
文件大小:8KB
文件格式:ZIP
更新时间:2021-06-03 15:48:17
Clojure 水池 用于池化和缓存创建成本高的对象。 ##安装 用法 ( use 'pool.core) 对象池 get-pool使用无参数函数来创建对象。 ( def pool ( get-pool ( fn [] :heavy-object ))) 接下来,从池中borrow和return 。 ( borrow pool) ; => :heavy-object ( return pool :heavy-object ) ### get-keypool Object Pool get-keypool使用单个 arity 函数来创建对象。 ( def pool ( get-keypool ( fn [k] ( str :heavy k)))) ( borrow pool :object ) ; => ":heavy:object" ; Return key and object ( retu
【文件预览】:
pool-master
----src()
--------pool()
----LICENSE(11KB)
----README.md(2KB)
----project.clj(371B)
----.gitignore(84B)

网友评论