Posts

  • golang chan source code reading

    file

    runtime/chan.go

  • golang source code reading

    之前写过几篇 blog, 本来打算每月写一篇的, 并且 drafts 里面放了好几篇, 不过总是断断续续的写到最终竟然连想要表达的观点也忘记了只好一直放置了.
    最近阅读 golang 源码作一些笔记避免时间一长有些东西就忘记了, 算是暂时开了一个新坑, 可能会有许多错误的地方, 欢迎讨论
    这并不是一个系列,就只是看到那里于是就记下来.

  • golang channel 的关闭

    TL;DR

    • 避免多个 goroutine 共享 channel write 权限
    • 只在一个地方 close
    • 不关闭
  • a tiny queue implement

    TL;DR
    使用 slice 缓冲消息, 利用 sync.Cond 实现管道内有消息时通知 consumer

  • Welcome to Jekyll!

    You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.

subscribe via RSS