golang 的sync包中有两种锁,互斥锁sync.Mutex 和读写锁sync.RWMutex

sync.Mutex

sync.RWMutex

Lock()/Unlock()

RLock()/RUnlock()