golang中sync.Pool的使用示例
摘要:
先上代码: package main import ( "fmt" "sync" ) var pool sync.Pool type person struct { Name string Age int } func init() { pool = sync.Pool{New: func() an 阅读全文
posted @ 2023-04-23 23:26 进击的davis 阅读(114) 评论(0) 推荐(0) 编辑