[Golang] Mutex 鎖
- Package sync 有 type Mutex 和 type RWMutex 利用各種鎖來避免 Race Condition
- type Mutex
- func(m *Mutex) Lock()
- func(m *Mutex) Unlock()
- type RWMutex
- func(rw *RWMutex) Lock() 一般鎖
- func(rw *RWMutex) RLock() 讀鎖
- func(rw *RWMutex) RLocker() Locker
- func(rw *RWMutex) RUnlock() 解開讀鎖
- func(rw *RWMutex) Unlock()
- type Mutex