chenyahui / chenyahui.github.io

My blog
http://www.cyhone.com
0 stars 2 forks source link

深度分析 Golang Sync.Pool 底层原理 | 编程沉思录 #63

Open chenyahui opened 2 years ago

chenyahui commented 2 years ago

https://www.cyhone.com/articles/think-in-sync-pool/#more

本文属于 《Golang 源码剖析系列》 sync.Pool 是 Golang 内置的对象池技术,可用于缓存临时对象,避免因频繁建立临时对象所带来的消耗以及对 GC 造成的压力。 在许多知名的开源库中,都可以看到 sync.Pool 的大量使用。例如,HTTP 框架 Gin 用 sync.Pool 来复用每个请求都会创建的 gin.Context 对象。 在 grpc-Go、kubernate

codeicu commented 2 years ago

嘻嘻 看不懂

xuanskyer commented 2 years ago

👍🏻

supermario1990 commented 2 years ago

Pangjiping commented 1 year ago

写的太棒了!

YakultGo commented 5 months ago

写的很好,受益很多