03 2022 档案
摘要:Overview Definition From wikipedia The actor model in computer science is a mathematical model of concurrent computation that treats actor as the univ
阅读全文
摘要:Overview go 里面的 rwlock 是 write preferred 的,可以避免写锁饥饿。 读锁和写锁按照先来后到的规则持有锁,一旦有协程持有了写锁,后面的协程只能在写锁被释放后才能得到读锁。 同样,一旦有 >= 1 个协程写到了读锁,只有等这些读锁全部释放后,后面的协程才能拿到写锁。
阅读全文