gitalk icon indicating copy to clipboard operation
gitalk copied to clipboard

真实世界的Go设计模式 - 对象池模式

Open utterances-bot opened this issue 1 year ago • 1 comments

真实世界的Go设计模式 - 对象池模式

对象池(object pool pattern)是一种设计模式。一个对象池包含一组已经初始化过且可以使用的对象,而可以在有需求时创建和销毁对象。池的用户可以从池子中取得对象,对其进行操作处理,并在不需要时归还给池子而非直接销毁它。这是一种特殊的工厂对象。

https://colobu.com/2023/08/08/go-design-pattern-pool/

utterances-bot avatar Aug 08 '23 17:08 utterances-bot

arena在1.20中作为实验特性一直是可用的

manchurio avatar Aug 08 '23 17:08 manchurio