Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post/go-training-week5-singleflight #262

Closed
utterances-bot opened this issue Jul 7, 2021 · 3 comments
Closed

post/go-training-week5-singleflight #262

utterances-bot opened this issue Jul 7, 2021 · 3 comments
Labels

Comments

@utterances-bot
Copy link

Go并发编程(十二) Singleflight - Mohuishou

mohuishou 的 技术博客, 关注云原生, Go, K8s, Docker, 微服务等技术

https://lailin.xyz/post/go-training-week5-singleflight.html

Copy link

wpliang commented Jul 7, 2021

用双重 defer 来避免死锁, 不是特别理解,能解释下吗

@mohuishou
Copy link
Owner

用双重 defer 来避免死锁, 不是特别理解,能解释下吗

如果只有一个 defer 不区分传入的 fn panic 和 runtime panic 是可能出现死锁的,例子和相关讨论可以看这个 issue

golang/go#33519

Copy link

singleflight只适用于缓存击穿

@mohuishou mohuishou added the blog label Sep 11, 2022
Repository owner locked and limited conversation to collaborators Sep 11, 2022
@mohuishou mohuishou converted this issue into discussion #550 Sep 11, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

4 participants