go-eden / routine

Provides some convenient API, includes Goid(), GetG() and LocalStorage, which is a goroutine's local storage, just like ThreadLocal in other languages.
MIT License
114 stars 20 forks source link

为什么在 NewLocalStorage 调用的是 new(storage) 而不是 newStorage() ? #16

Closed nizheming closed 1 year ago

nizheming commented 1 year ago

这个会导致所有 new 的 storage 的 key 是 0 ?导致最后实际 storage 最后共享了一套 value?

sisyphsu commented 1 year ago

这是v1.0.0版本引入的bug,谢谢反馈。

已经补齐了testcase并完成了修复。