Open utterances-bot opened 2 years ago
来躺平新青年的技术分享
https://wwhai.github.io/2022/06/07/cl5z4jwaa0058lcg9hpmaczs7.html
golang 的 defer 是挂到当前goroutine 上的一个链表上。发生panic的时候,会去遍历这个链表,相当于按找调用的栈帧,一层一层往外弹。
用C模拟golang的defer - 来躺平新青年
来躺平新青年的技术分享
https://wwhai.github.io/2022/06/07/cl5z4jwaa0058lcg9hpmaczs7.html