channel

Posted by 夏泽民

channel 是 Golang 中一个非常重要的特性,也是 Golang CSP 并发模型的一个重要体现。简单来说就是,goroutine 之间可以通过 channel 进行通信。



zen of go

Posted by 夏泽民

https://dave.cheney.net/2020/02/23/the-zen-of-go How should I write good code? Something that I’ve been thinking about a lot recently, when reflecting on the body of my own work, is a common subtitle, how should I write good code? Given nobody actively seeks to write bad code, this leads to the question; how do you know when you’ve written good Go code?



go1.14基于netpoll优化timer定时器实现原理

Posted by 夏泽民

http://xiaorui.cc/2020/02/11/go1-14%e5%9f%ba%e4%ba%8enetpoll%e4%bc%98%e5%8c%96timer%e5%ae%9a%e6%97%b6%e5%99%a8%e5%ae%9e%e7%8e%b0%e5%8e%9f%e7%90%86/ golang1.14版的rc已经发布有些日子了,在官方go1.14的介绍里有说优化了timer定时器。golang的定时器已经经历了几版的优化,但在依赖定时器的高性能场景,还是成为一个大的性能杀手。 go1.13和go1.14的区别?



go1.14 基于信号的抢占式调度实现原理

Posted by 夏泽民

https://gocn.vip/topics/9884 go 1.14 中比较大的更新有信号的抢占调度、defer 内联优化,定时器优化等。前几天刚写完了 golang 1.14 timer 定时器的优化,有兴趣的朋友可以看看go1.14 基于 netpoll 优化 timer 定时器实现原理



go 理解 Lock-Free

Posted by 夏泽民

锁是编程中常用的技术, 通常应用于共享内存, 多个线程向同一资源操作往往会发生很多问题, 为了防止这些问题只能用到锁解决. 虽然锁可以解决, 但是在高并发的场景下, 可能会造成性能瓶颈. 无锁编程目前大多数都是基于atomic实现, atomic能够保证数据的正确性, sync.Mutex也有 Lock-Free 的影子.



Search

Popular posts

Anything in here will be replaced on browsers that support the canvas element

Recent posts

This blog is maintained by 夏泽民

Get in touch with me at 465474307@qq.com

Subscribe to our mailing list

* indicates required