为什么条件变量中的RWMutex没有RLock和RUnLock方法?package main
"sync" cond := &sync.Cond{L: &sync.RWMutex{}} cond.L.RUnlock()我有个错误:
cond.L.RLock undefined (type sync.Locker has no field or method RLock
public class ConcurrentLock {private Lock rLock = new Lock();public static void main(String[] args){
public int Read(){ rLock.lock();e) { e.printStackT